Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Sergio.D.Suárez
in reply to: Anonymous

Hi, try this ilogic code to trigger a macro, if you can not activate it with the previous code.

Dim oP As InventorVBAProject
For Each oP In ThisApplication.VBAProjects
	If oP.Name = "ApplicationProject" Then
	  Dim oC As InventorVBAComponent
	  For Each oC In oP.InventorVBAComponents
	    If oC.Name = "Module1" Then
	      Dim oM As InventorVBAMember
	      For Each oM In oC.InventorVBAMembers
	        If oM.Name = "prueba" Then ' "MyFunction"
	          oM.Execute()
	        End If
	      Next oM
	    End If
	  Next oC
	End If
Next oP

Check correctly the location path of the macro, otherwise it will not perform any action

1.jpg

 I hope this helps solve your problem


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn