05-04-2023
04:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
05-04-2023
04:20 AM
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.