Inventor General

Reply
Contributor
hardsniffer
Posts: 24
Registered: ‎03-07-2010
Message 1 of 4 (987 Views)

iLogic connection to VBA Editor

987 Views, 3 Replies
04-23-2010 04:25 AM
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
Employee
MjDeck
Posts: 957
Registered: ‎02-24-2009
Message 2 of 4 (987 Views)

Re: iLogic connection to VBA Editor

04-26-2010 06:16 PM 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
DLS - Mechanical Design
Autodesk, Inc.

Active Contributor
ConfigurationGenius
Posts: 44
Registered: ‎08-07-2007
Message 3 of 4 (987 Views)

Re: iLogic connection to VBA Editor

04-27-2010 10:04 AM 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
Distinguished Contributor
Carthik_Babu
Posts: 120
Registered: ‎01-29-2013
Message 4 of 4 (236 Views)

Re: iLogic connection to VBA Editor

03-11-2013 04:46 AM 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@gabriel.co.in ,
https://grabcad.com/carthik-1/projects
"May all beings be happy" http://www.dhamma.org/

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube