Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This is some rough code. What I am trying to do is go through the parts of an assembly, then suppress or unsupress it according to it's part name and XYZ coordinates in the assembly it is in. Has anyone done something like this before?
Dim Part1 As String Dim Comp1 As Object For Each Comp1 In ThisAssembly.Components Part1 = Comp1.Item.Name ' If stringcontains(Part1, "Panels") = True ' If part origin is within accepted area (need to write code/math) ' Component.IsActive(Part1) = True ' Else ' Component.IsActive(Part1) = False ' End If ' End If Next Components
I have not yet figured out the exact math to do the commented out section. I am mainly asking about the for→each→next loop actually cycling through all the parts in the assembly.
Solved! Go to Solution.