Message 1 of 4

Not applicable
06-23-2016
06:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi I am playing around with ilogic to help automate some designs. I have been trying to write a bit of code which when an assembly is resized any components which are not being used will have the visibility turned off. I then already have a piece of code from searching the forums which will delete the unused parts. I basically want a bit of code which will filter down through the assembly, and any parts with a weight of '0' will get the visibility turned off. So far i have this....
SyntaxEditor Code Snippet
Dim openDoc As Document Dim assemblyDoc As AssemblyDocument Dim assemblyDef As AssemblyComponentDefinition Dim obj As Object If TypeOf obj Is ComponentOccurrence Then Dim occ As ComponentOccurrence End If openDoc = ThisDoc.Document imass = iProperties.Value("Custom", "WEIGHT") For Each occ In openDoc.AllReferencedDocuments If iProperties.Value(occ, "Custom", "WEIGHT") = 0 Then occ.Visibility = Not occ.Visibility End If Next
...but cant get any further. Would anyone be able to help me please?
Cheers
Luke
Solved! Go to Solution.