Macros(VBA) can be run from the AddIn(VB.NET) using the code:
Dim invVBA As InventorVBAMember
invVBA = m_inventorApplication.VBAProjects.Item(1).InventorVBAComponents.Item("Module№").InventorVBAMembers("Sub№")
invVBA.Execute()
But I encountered such a problem that if the macro password is set, the program Adin does not work until manually until shalt bring the password in the VBA ...
Is there a way to separate these processes, so that the macro with the password can be run from the AddIn?
This problem is not Inventor API related.
Hope the following links could clarify the situation a little bit:
http://stackoverflow.com/questions/16174469/unprotect-vbproject-from-vb-code
http://www.pcreview.co.uk/threads/programmatically-open-locked-vbaproject.3371133/
http://stackoverflow.com/questions/24804329/open-password-protected-vba-project-programmatically