Call an iLogic Global Form from within a Macro

Call an iLogic Global Form from within a Macro

fsdolphin
Collaborator Collaborator
697 Views
2 Replies
Message 1 of 3

Call an iLogic Global Form from within a Macro

fsdolphin
Collaborator
Collaborator

Hi, I have a global form that I constantly use so, I would like to be able to call the Form using a shortcut.  I was thinking to create a Macro, call the Form from the Macro and then create a shortcut for the Macro.  Similar to the way you would call an iLogic rule from a Macro.

 

Is there a way to call an iLogic Global Form from within a Macro in Inventor?

 

Or better yet, is it possible to create a shortcut to a Global Form without creating a Macro?

 

Ref: Call iLogic Rules From a Macro

Inventor: Run iLogic Rules from your Ribbon – Cadline Community

 

Thanks a lot!

0 Likes
Accepted solutions (1)
698 Views
2 Replies
Replies (2)
Message 2 of 3

JhoelForshav
Mentor
Mentor
Accepted solution

Hi @fsdolphin 

Here's a quick way I could think of to show a global form through a VBA macro. It'll temporarily create an iLogic-rule that will display the form and then be deleted.

Sub ShowGlobalForm()
Set iLogicVb = ThisApplication.ApplicationAddIns.ItemById("{3BDD8D79-2179-4B11-8A5A-257B1C0263AC}")
Set iLogicAuto = iLogicVb.Automation
'Create iLogic rule that shows the form (executes automatically)
Call iLogicAuto.AddRule(ThisApplication.ActiveDocument, "showForm", "iLogicForm.ShowGlobal(""Form 1"")") 'Change "Form 1" to name of your form
'Delete the rule
Call iLogicAuto.DeleteRule(ThisApplication.ActiveDocument, "showForm")
End Sub

 

Message 3 of 3

fsdolphin
Collaborator
Collaborator

It worked, thanks a lot for your help.

0 Likes