Call "Place iLogic Component" from VBA

Call "Place iLogic Component" from VBA

Anonymous
Not applicable
1,221 Views
5 Replies
Message 1 of 6

Call "Place iLogic Component" from VBA

Anonymous
Not applicable
Hi, Experts

The iLogic command called "Place iLogic Component" works very fine for me, but I need to put this command in a toolbar button that insert a specific part. Is there a way to do this?.

I know how to do this using the inventor "place component" command using VBA, but, I don't know if that command can be called from a VBA function.

Thanks for your help!.
0 Likes
1,222 Views
5 Replies
Replies (5)
Message 2 of 6

MjDeck
Autodesk
Autodesk
You can start the Place iLogic Component command using this code:

Dim controlDef as ControlDefinition = ThisApplication.CommandManager.ControlDefinitions.Item("iLogic.PlaceComponent")
controlDef.Execute

Mike Deck
Software Developer
Autodesk, Inc.

0 Likes
Message 3 of 6

Anonymous
Not applicable
Hi, MjDeck

Thank you very much for your time, excellent answer!!
0 Likes
Message 4 of 6

Anonymous
Not applicable

This works great.  Now is there a way to specify a specific iLogic part with out the dialog box opening up?  I just want to place a series of buttons that the user pushes on a form and it opens up that iLogic Part. 

0 Likes
Message 5 of 6

Anonymous
Not applicable

Hi!

 

I am stuck at this command called "Place iLogic Component". I cannot find it anywhere, can you please write the code down? 

 

Thank you very much in advance!

0 Likes
Message 6 of 6

cencinaNB2ET
Advocate
Advocate

The command just simulates pressing the button.

How do we fill up the file browser with code?

 

Thanks

0 Likes