Message 1 of 5

Not applicable
07-16-2013
01:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello. I'm new to the VBA and new in the forum.
I found a VBA-code on internet which turn off all work features (plane, axis, points) in all documents in an assembly.
I want to modify it so it turns of all surface bodies instead. I use skeleton modelling where i only want to keep the solids visible and not the surfaces. When I run this iLogic rule all solids get turned off instead of surface bodies. What do I do wrong? This code works (when edited) for axis, points, planes, allworkfeatures etc.
Thanks in advance 🙂
'catch and skip errors On Error Resume Next 'define the active assembly Dim oAssyDoc As AssemblyDocument oAssyDoc = ThisApplication.ActiveDocument 'get user input as True or False wfBoolean = InputRadioBox("Turn all Work Features On/Off", "On", "Off", False, "iLogic") 'Check all referenced docs Dim oDoc As Inventor.Document For Each oDoc In oAssyDoc.AllReferencedDocuments 'set surface bodies visibility For Each oSurfaceBodies In oDoc.ComponentDefinition.SurfaceBodies oSurfaceBodies.Visible = wfBoolean Next Next 'update the files InventorVb.DocumentUpdate()
Solved! Go to Solution.