External Rules Directory thru API in Inventor 2016

External Rules Directory thru API in Inventor 2016

Anonymous
Not applicable
742 Views
2 Replies
Message 1 of 3

External Rules Directory thru API in Inventor 2016

Anonymous
Not applicable

Has anyone found a way to get to the External Rule Directories thru the API?  I'm looking for a way to get to the paths and I can't seem to find anything.  Any help would be greatly appreciated.

 

ExternalRulesDiretory.png

0 Likes
Accepted solutions (1)
743 Views
2 Replies
Replies (2)
Message 2 of 3

Vladimir.Ananyev
Alumni
Alumni
Accepted solution

Could you please try this VBA code to test ExternalRuleDirectories property:

Sub GetExtRulesPath()

    'get iLogic addin Automation
    Dim ClientId As String
    ClientId = "{3BDD8D79-2179-4B11-8A5A-257B1C0263AC}"
    Dim iLogicAddIn As ApplicationAddIn
    Set iLogicAddIn = ThisApplication.ApplicationAddIns.ItemById(ClientId)
    
    Dim iLogicAuto As Object
    Set iLogicAuto = iLogicAddIn.Automation
    If (iLogicAuto Is Nothing) Then
        Call MsgBox("Can not use iLogic")
        Exit Sub
    End If
    
    'print external rule directories
    Dim path As Variant
    For Each path In iLogicAuto.FileOptions.ExternalRuleDirectories
        Debug.Print ("Directory name: " + path)
    Next
End Sub

Hope this helps.


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Message 3 of 3

Anonymous
Not applicable

That worked beautifully. 

0 Likes