VBA how do i change the library/folder it looks in ?

VBA how do i change the library/folder it looks in ?

Darkforce_the_ilogic_guy
Advisor Advisor
254 Views
3 Replies
Message 1 of 4

VBA how do i change the library/folder it looks in ?

Darkforce_the_ilogic_guy
Advisor
Advisor

I have a problem that after move to a new computer and to inventor 2024, that now it can´t find the ilogic code. IT seens to not looking the right folder any more.  How do I change this so it look in the right folder ?

Private Sub SharedViews_Click()
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 = "SharedViews"
    
    'Dim RuleName2 As String
    'INTERNALrule = "Rule2"
     
      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

 

sdf

0 Likes
255 Views
3 Replies
Replies (3)
Message 2 of 4

Curtis_Waguespack
Consultant
Consultant

Hi @Darkforce_the_ilogic_guy 

Your title say VBA but you seem to be asking about iLogic?

Here is how you set the path to your external iLogic rules:
Inventor 2024 Help | To Configure iLogic Options | Autodesk

 

EESignature

0 Likes
Message 3 of 4

I am asking about VBA. I use VBA userform to aktivere ilogic. After we have installe a test PC with inventor 2024. I seens to not able to find the ilogic files. I believe that it for some reasom looks in the wrong folder. 

 

 the files normal is locate in this folder

Darkforce_the_ilogic_guy_0-1713864496559.png

but for some reason it can not find the files anymore. So my question is how to I get the VBA code to look in the right folder?

 

0 Likes
Message 4 of 4

mslosar
Advisor
Advisor

Application Options/File Tab/VBA Folder section.

0 Likes