Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
mattias-bergson
417 Views, 3 Replies

How do I trigger a ivb macro in Inventor with c# ?

I am currently working on a project which requires the job processor to open an idw file with inventor and trigger a couple macros. The .ivb ilogic file has multiple macros saved.

 

My problem is that I don't know how to trigger the ivb macros with inventor.

 

Currently I have this c# code:

 

 

public static void ExecuteMacros(string idwPath)
        {
            Inventor.Application invInstance = null;
            try
            {
                invInstance = LaunchInventor(true);

                Inventor.Document document = invInstance.Documents.Open(idwPath);


                if (document is Inventor.DrawingDocument)
                {
                   
                    // Execute Macros

                }



            }
            catch (Exception ex)
            {

            }
            finally
            {
                if (invInstance != null)
                {
                    invInstance.Quit();
                }
            }

        }

 

 

How can I trigger the macros? The .ivb macros I want to trigger don't require any arguments.