[C++] The IiLogicForm interface IID for QueryInterface

[C++] The IiLogicForm interface IID for QueryInterface

Anonymous
Not applicable
1,250 Views
7 Replies
Message 1 of 8

[C++] The IiLogicForm interface IID for QueryInterface

Anonymous
Not applicable

Can't find SDK for iLogic plugin
Can't find IID's list for iLogic plugin

 

No C#, No VB (VBA), C++ only plz !!!

0 Likes
Accepted solutions (1)
1,251 Views
7 Replies
Replies (7)
Message 2 of 8

Anonymous
Not applicable

Hello

 

More correct questions:

1. How to get SDK for iLogic plugin ?
2. How to get list of forms from iLogic plugin ?
3. How to get a pointer to IiLogicForm interface (Forms list) ?
4. How to get IID's list of iLogic plugin interfaces (I Can't find TLB) ?
5. How to get the correct IUnknown interface from the iLogic plugin (plugin->IDispatch->QueryInterface) ?

 

C/C++ (MFC) only plz !!!

 

Thank You

0 Likes
Message 3 of 8

yan.gauthier
Advocate
Advocate

SDK Location : Windows 7/8.1/10:   C:\Users\Public\Documents\Autodesk\Inventor <version>\SDK

 

For the rest, I can't help you since I develop C# Addins and VBA macro only.

 

Cheers,

0 Likes
Message 4 of 8

yan.gauthier
Advocate
Advocate

Sorry forum bug, posted twice...

 

Cheers,

0 Likes
Message 5 of 8

MjDeck
Autodesk
Autodesk
Accepted solution

@Anonymous , there is no SDK for iLogic.

I don't have VS2015 installed, but I put together a test program in VS2017 to list the forms in the active Inventor document. Please see if you can use this, or extract code from it. It's an MFC executable and it uses C++/CLI to create a new iLogicForm object. iLogicForm is just a C# class. It's not exposed to COM. But it can be accessed with C++/CLI.

This will list the forms in the document. But you can't use it to launch a form because it's running from outside of the Inventor process. If you need to launch a form, I would recommend creating an Inventor add-in.


Mike Deck
Software Developer
Autodesk, Inc.

Message 6 of 8

Anonymous
Not applicable

Firstly, I want to say thank you for the answer here and on the adndevblog.typepad.com forum
Unfortunately, there are very few people on this forum who really understand low-level programming of COM/OLE interfaces

 

I read an article "How to automate Excel from C++ without using MFC or #import" on the microsoft site, which has a good example of a wrapper for Invoke function (Disp -> GetIDsOfNames -> Invoke)

 

This late binding example is good for working with an iLogic Automation interface, but there are no functions in this interface for working with forms

 

I have the following conclusion, as iLogic objects are not real COM objects,
I cant use direct interface calls and therefore I need use .NET integration

 

If there are no more solutions for this problem, I will mark this topic later as Solved

In my old c# application (working as an external process not plug-in), i also used late binding to call Forms/Rules functions

 

And thanks again for your time and code

 

Inventor_forum.png

0 Likes
Message 7 of 8

JelteDeJong
Mentor
Mentor

As far as i know is iLogic an addin writen in a .Net laguage (not sure wich exact.) on top of the Inventor API. Therefor every thing you can do iLogic can also be done with Inventor API (and nothing more). Using the Inventor API is sometimes more complicated but has much more options. 

Anyway if you want to write in C++ and want to use the Inventor api you should check out this site:

http://www.ransensoftware.com/Inventor-CPP/index.html 

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

Message 8 of 8

Anonymous
Not applicable

I know

 

Owen Ransen wrote an amazing book

 

This book is my bible in low-level programming Inventor API

 

0 Likes