Call module from compile

Hello,

I make two teste scripts:

call_module.py (119 Bytes)
parameter.py (136 Bytes)

I try compile all and install on rhino, the intention is to call the “parameter.py” from “the call_module”, but for some reason this does not work, why?

Is there any way to do this?

thanks

Any one?

Hi @MatrixRatrix,

are you compiling with the RhinoScriptCompiler ? If this is the case, modules for python scripts are not supported yet according to this post.

_
c.

Thank you Clement,

Here is on way to make my custom modules work compile with the scripts?

Thanks

Hi @MatrixRatrix, only if you copy your functions from your module inside the script so you can compile the script as one command. Or, if you do not compile the module and include it (as py file) with the installation of the compiled script.

_
c.

Thank you Clemente,

I explore some ideas from use ,dll compile modules, that I found here Possibility to run Compiled Python Script (.pyc)?

I make some simple test, and this work on python editor.

The question is, if I compile all custom modules to .dll, and use the rhino compile to the main.py
files?

This work?, and if work how can i do the installation all at once (.dll + .rhi)? what is the location of .dll files?

thanks

Hi @MatrixRatrix, i guess this will work, have you tried it yet ? Keep track of two things:

  1. Include the module.dll file(s) in your rhi installer as described here
  2. If clr.AddReference cannot find the dll, use clr.AddReferenceToFileAndPath

to get the path of your plugin from the compiled script, read this .

Should be the same as your plugin file after installation.
_
c.