Stuck adding a .NET *.dll reference in GhPython

That is something that will have to be worked out between you and CSi. 64bit applications can only load 64bit or AnyCpu DLLs; 32bit applications can only load 32bit or AnyCpu DLLs. That’s an operating system level issue that we don’t have control over.

1 Like

That was my assumption, I will.

@stevebaer and @piac, thanks a lot for the support in this thread.

There was a flaw in the initial release of the sap v17 dll that meant it only works with 32 bit.

I only support v17.1 as they fixed the issue and made it bit agnostic for that release.

If you can’t use v17.1, I believe they sent me a revised dll for v17 that I might be able to locate.

Hope this helps,

Jon

Hi @jonm

I sent you a message. Thanks for clarifying this. I was going crazy trying to make it work :S

Best Regards,.

150613 sap python api.gh (2.9 KB)

See if this helps. You need to reference the dll (not the exe which I’m assuming is 32bit).
This sample code starts the SAP application from python on my computer.

Cheers,

Jon

2 Likes

Thanks @jonm!! Testing this week. I displaced the sap2000 connection recoding to invest some time in my building generator algorithm. I’ll let you know how it works.

Thanks a lot.

Do you have the code of gh python which is used to attach to instance sap