Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic connection to VBA Editor

3 REPLIES 3
Reply
Message 1 of 4
hardsniffer
1436 Views, 3 Replies

iLogic connection to VBA Editor

I will start to explain what I want. I want to place an iLogic component in an assembly. When I place the component a window should appear where I can enter some dimensions. That's it basicly.

I have created a userform in VBA. With two fields for dimensions, an OK and Cancel button. There is no code behind it because I don't know what to place. The code in the form should send the filled in value to the userparameter in the model. e.g. "width: 50mm" to WIDTH.
I have an iLogic component with its parameters.

I have IV 2011. And studied the iLogic examples. But the part where I'm interrested in is hidden in the .dll file which is used for reference. This won't help me.

Stephan
3 REPLIES 3
Message 2 of 4
MjDeck
in reply to: hardsniffer

Stephan,

I would recommend using VB.NET instead of VBA. Inventor 2011 includes samples of VB.NET projects that build forms for entering dimensions, along with the iLogic rules to connect to them. These are installed in the directory of the "iLogic 2011 Samples" Inventor project.

But it is also possible to hook up to a VBA form. You can use the Inventor API (the Parameters collection on the PartComponentDefinition or AssemblyComponentDefinition object) to access all parameters. You might not need to use the iLogic API from the form.

You can see some documentation for the interfaces in Autodesk.iLogic.Interfaces.dll if you add a reference to this dll and then use the Object Browser in Visual Studio. The iLogic API is accessed on the Autodesk.iLogic.Interfaces.IiLogicAutomation interface.

It's not easy to bring up a custom form automatically during the Place iLogic Component command. One way to do it would be to have a True/False parameter named ShowForm. If you change it to True it would fire a rule that would show the form.

Mike Deck
Autodesk

Mike Deck
Software Developer
Autodesk, Inc.

Message 3 of 4
fle
Enthusiast
in reply to: hardsniffer

Stephan,

An alternative to programming in VB or VBA is using confidity. It allows you adding a dialog to your iLogic model and your Inventor files without any additional work.

CG
http://www.confidity.com
Message 4 of 4
Carthik_Babu
in reply to: hardsniffer

Hi,

 

Kindly find my Excel File: link collection to do your task. I have'nt still got any good solution regarding the same.

 

Hope it will be useful for you or for some one who looks for solution. Lets share our work and grow together

 

Regards,

Carthik

Carthik Babu M.S, Asst Manager - Machine Building,
Gabriel India Ltd,Hosur, TN, INDIA
Email:carthik_ms@yahoo.co.in ,
https://grabcad.com/carthik-1/projects
"May all beings be happy" http://www.dhamma.org/

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report