RunPythonScript not using ipy64.exe with Rhino 64-bit

rhino
rhinopython
rhino5

#1

Hi everyone,

I wrote a first script (RunScript.py) calling a DLL that runs in IPython to be Rhino compliant. To test it I used ipy.exe and it worked well (it enters and read the DLL). Same when running the script with Rhino 64-bit.

When adapting and testing my script to another DLL, it didn’t work with ipy.exe nor with Rhino 64-bit, but it worked with ipy64.exe (indeed the library was compiled in 64.

Does it means that the command RunPythonScript launched in Rhino 64-bit is not using ipy64.exe but ipy.exe?

Best regards,
Nathan


(Giulio Piacentino) #2

Hi @Nathan_Clero

Rhino does not use either of the .exe’s, but uses the implemenation of IronPython that in turn those programs use. If you are more specific regarding the error, maybe we could assist further.

Giulio

Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com


#4

Hey @piac

Does it help?

Thanks a lot for the help!

Nathan


(Giulio Piacentino) #5

Hi again @Nathan_Clero. The reasons why it could not add references can be multiple.

One, which is the simplest one, would be that the path to the assembly is unknown. Try using AddReferenceToFileAndPath() or another of the alternatives to see if the problem persists.

Also, ipy.exe is not a product of Robert McNeel & Associates.

Giulio

Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com


#6

Hi @piac,

Unfortunately AddReferenceToFileAndPath didn’t work … And AddReference worked before with ipy64.exe so I guess the AddReference is enough.

It seems that Rhino is using IronPython 32-bit, can you confirm that?

Nathan


(Steve Baer) #7

IronPython runs embedded in the Rhino process so if you are running Rhino 32 bit, then IronPython will be executing as 32 bit. If you are running the 64 bit version of Rhino, then IronPython will be executing as 64 bit.


#8

Hi @stevebaer,

Mmmmmh I will check that again but it didn’t seem to work like that because it worked with ipy64.exe but not with Rhino 64-bit for me … :confused:

Unless this is a bug, maybe I am not fully understanding the problem.

100% sure about IronPython running with the same architecture as Rhino? (I am secretly hoping that there is a trick :grin:)

Nathan


(Steve Baer) #9

101% sure even. Operating systems don’t allow a single process to have different bit flavors for different parts.


(Steve Baer) #10

Sharing your script may give us a clue as to what is going wrong