Run an EXE from inside an iLogic rule

Top  Previous  Next

Here is an example:

 

Sub Main()

       

   Dim sProgramName As String

   Dim sArgument As String

   Dim Q As String

   Q=Chr(34) ' Quote character

 

   sProgramName = "C:\PLMProgs\Simu.Exe"

       

   ' Note that "Latest Working" must have quotes around it in this example...

   sArguments = " Ransen.IAM " & Q & "Latest Working" & Q

 

   Call Shell(sProgramName & " " & sArguments, vbNormalFocus)

End Sub

 

Note that when you exit the iLogic editor Inventor will try to run the program

 

 

Text, images and diagrams © 2021 Owen F. Ransen. All rights reserved. (But copy the source code as much as you want!)