Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Hide nodes of browserfolder (assembly)

0 REPLIES 0
Reply
Message 1 of 1
mizo303
245 Views, 0 Replies

Hide nodes of browserfolder (assembly)

Hello ,

 

i  a made a browserfolder on assemblylevel and want to do the following things (ilogicrule) :

 

- Set the visiblility of the ocurrences in this folder.

- Set the bomstructure of the ocurrences (default when visible / reference when invisible)

 

When the folder contains a componentpattern ,the bomstructure of the patternelements doesn't change when i change the visiblility.

 

Can anyone see what's going wrong in my rule please ?

Thx

 

 

Private Sub SetVisibilityFolderContent(ByVal FolderName As String, ByVal Visibility As Boolean)

On Error Resume Next

 

oPane = ThisDoc.Document.BrowserPanes("Model")

 

'Get the browser folder object

oFolder = oPane.TopNode.BrowserFolders.Item(FolderName)

 

'Get the set of nodes in the folder

oFolderNodes = oFolder.BrowserNode.BrowserNodes

 

'Cycle through each browser node in the folder

      For Each oNode As BrowserNode In oFolderNodes

 

            oComp = oNode.NativeObject  

 

            'set Visibility folder contents   

            If Visibility = True Then

            oComp.BOMStructure = Inventor.BOMStructureEnum.kDefaultBOMStructure

            oComp.Visible = True

            Else

           oComp.BOMStructure = Inventor.BOMStructureEnum.kReferenceBOMStructure

          oComp.Visible = False

           End If

      Next   

                     

End Sub

 

 

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report