Public Sub Create_3DPDF() Dim addIn As ApplicationAddIn Dim addIns As ApplicationAddIns Set addIns = ThisApplication.ApplicationAddIns For Each addIn In addIns If InStr(addIn.DisplayName, "iLogic") > 0 Then addIn.Activate Dim iLogicAuto As Object Set iLogicAuto = addIn.Automation Exit For End If Next Debug.Print addIn.DisplayName Dim RuleName1 As String EXTERNALrule = "3D PDF" Dim RuleName2 As String INTERNALrule = "GroundAll" Dim oDoc As Document Set oDoc = ThisApplication.ActiveDocument If oDoc Is Nothing Then MsgBox "Missing Inventor Document" Exit Sub End If 'iLogicAuto.RunRule oDoc, INTERNALrule 'for internal rule iLogicAuto.RunExternalRule oDoc, EXTERNALrule 'for external rule End Sub