Autodesk.iLogic.Interfaces and Copy Local

Autodesk.iLogic.Interfaces and Copy Local

DonStauffer99
Advocate Advocate
963 Views
5 Replies
Message 1 of 6

Autodesk.iLogic.Interfaces and Copy Local

DonStauffer99
Advocate
Advocate

Making DLLs using VB in Visual Studio 2017. I've found that to get the DoubleForEquals type to be recognized in my VB code, I need to add a reference to the project to Autodesk.iLogic.Interfaces.dll. I found some obscure Autodesk documentation which suggests it should be in C:\Program Files\Autodesk\Inventor 2018\Bin\iLogicBin, but that directory doesn't exist. It's actually in C:\Program Files\Autodesk\Inventor 2018\Bin. Then I have to put an Imports Autodesk.iLogic.Interfaces at the beginning of the source file that uses DoubleForEquals.

 

This works fine but I noticed that when I compile the project, it says "2 succeeded" and when I look in my "Build output path" directory, there's a copy of Autodesk.iLogic.Interfaces.dll there along with my DLL. Looking at the reference in Visual Studio, I noticed "Copy Local" said "True" on that reference. It allowed me to change it to false, and that did stop it from making the copy.

 

If I distribute my DLL and somebody else with Inventor tries to use it, will it have trouble finding Autodesk.iLogic.Interfaces.dll? Should I leave Copy Local as True and distribute Autodesk.iLogic.Interfaces.dll with my DLL? I've read some descriptions where Copy Local True actually caused some problems, and it was with this DLL. So I'm confused. Why was it True to begin with when the other references seem to default to False? What is this all about?

 

Thanks for your insight.

0 Likes
964 Views
5 Replies
Replies (5)
Message 2 of 6

DonStauffer99
Advocate
Advocate

Anybody familiar with Windows DLL management?

0 Likes
Message 3 of 6

AlexFielder
Advisor
Advisor

Hi Don,

 

I'm not sure why you need to reference the iLogic assemblies specifically? Since you're working in Visual Studio you can just use the API itself.

 

Perhaps if you share what code you have, it'll help the understanding and you'll get more responses.

 

Thanks,

 

Alex.

0 Likes
Message 4 of 6

MjDeck
Autodesk
Autodesk

I'm not sure why it's True to begin with. But I'd recommend changing it to False.
Autodesk.iLogic.Interfaces.dll is in Inventor's Bin folder. Because of that, Inventor will always be able to find it. You don't need another copy.


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes
Message 5 of 6

naresh_kalyan
Advocate
Advocate

Hi,

This is TRUE in Inventor 2017. We need add the ilogic Reference locally in Projects folder. Please, correct me Autodesk team... 

Forum guys: Is there any alternative way? Could you please let me know...

 

All I need to invoke a iLogic Rule thru VB.NET. No idea, why it's prompting error while running exe file. Where as, if I debug line by line, it's working fine.

 

iLogicAuto.runrule(odoc, "RuleName")

 

Regards

Naresh Kalyan

0 Likes
Message 6 of 6

Anonymous
Not applicable

Hi Naresh,

 If you're referencing it from a project that compiles to a standalone EXE file, and that EXE is stored outside of the Inventor bin folder, then you do need to copy it locally. The program has to be able to find it at runtime.

0 Likes