02-25-2016
01:52 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
02-25-2016
01:52 PM
Sorry I've forgot the following option
Sub IlogicRun()
Ilogic ("messaggio.txt") ' file rule name
End Sub
Sub Ilogic(rule As String)
Dim InventorApplication As Inventor.Application
Set InventorApplication = GetObject(, "Inventor.Application")
Dim iLogicAuto As Object
Dim oDoc As Inventor.Document
Set oDoc = InventorApplication.ActiveDocument
If oDoc Is Nothing Then
MsgBox ("Missing Inventor Document")
Exit Sub
End If
Set iLogicAuto = GetiLogicAddin(InventorApplication)
If (iLogicAuto Is Nothing) Then Exit Sub
exe = iLogicAuto.Automation.RunExternalRule(oDoc, rule)
End Sub
Private Function GetiLogicAddin(ByRef InvApp As Inventor.Application) As Inventor.ApplicationAddIn
Dim addIn As Inventor.ApplicationAddIn
Set addIn = InvApp.ApplicationAddIns.ItemById("{3bdd8d79-2179-4b11-8a5a-257b1c0263ac}")
addIn.Activate
Set GetiLogicAddin = addIn
End FunctionBregs
Rossano Praderi
--------------------------------------
If my post answers your question, please click the "Accept as Solution"
button. This helps everyone find answers more quickly!
---------------