- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, I am writing an Inventor AddIn in C#.
I want to dynamically execute a VBA script/a Macro in Inventor.
For example this simple Macro:
Sub My_Macro()
MsgBox "My First Macro"
End Sub
I know how to execute existing Macros. Therefore, my idea was to first add a macro (dynamically) and then execute it. However, I did not find any way to dynamically add macros.
I tried it via ControlDefinitions.AddMacroControlDefinition(string MacroOrProgram) but that method appears to not actually add a macro, but rather return the MacroControlDefinition object of an existing macro.
I then tried to add it via InventorVBAProjects object, where I can iterate over the different objects, and modules (InventorVBAComponents), etc. But again, there seems to be no way to actually add a macro, only iterate over existing ones.
Is it even possible to achieve this via the Inventor API?
Solved! Go to Solution.