Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I pass a variable to a VBA sub from within iLogic?

1 REPLY 1
Reply
Message 1 of 2
Anonymous
357 Views, 1 Reply

How do I pass a variable to a VBA sub from within iLogic?

This is a 2 part question

 

A.  How do I pass a variable to a sub from iLogic 

  Ie. I have an iLogic rule that runs when pressing a button

Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 1098 StartFragment: 314 EndFragment: 1066 StartSelection: 314 EndSelection: 314

InventorVb.RunMacro("DocumentProject", "basExport2FEMAP", "Export2FEMAP")

However I'd like to have a boolean pass to the sub but I don't know how to do that from the iLogic editor

 


I have....Public Sub Export2FEMAP()

I'd like....Public Sub Export2FEMAP(blAutoMesh as boolean)

 

B. once I can pass the bool to the sub can I have 2 buttons run one rule w/ a different boolean for each?  Right now I have a rule for export with automesh and one for just export.  Is there a way of telling the button to change the boolean with just one rule?

 

 

Tags (4)
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

Found the answer in this thread

 

http://forums.autodesk.com/t5/inventor-general-discussion/ilogic/td-p/2611136

 

Basically I just need to add the variable to the end

 

 

InventorVb.RunMacro("DocumentProject", "basExport2FEMAP", "Export2FEMAP",variable1,variable2,etc.)

 

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

Post to forums  

Autodesk Design & Make Report