I'm using Intent Professional 2011.
I want to hide some parts in a view.
This does'nt work for Pattern parts. Is there a way to hide patterns in a view?
Nicolas
I made a list of children I wanted to hide in a view and then call that list in the the hiddenParts parameter for the view.
The example code is from my app that builds concrete wall structures. In the building model, I have parts and assemblies that are not visible in the wall assemblies. When I added a view for a wall on a drawing sheet, the visible parts where showing up.
'List of invisible parts
Rule sideWallHiddenParts As List
Dim result As List = {}
Dim chld As Part
For Each chld In Me.children
If chld.visible? = False And (chld.isKindOf?(:IvAdoptedPart) Or chld.isKindOf?(:IvAssemblyDocument)) Then
result = result + {chld}
End If
Next
Return result
End Rule
'View child rule
Child rightWallStructuralLayout As :IvBaseView
designViewRepresentation = "Intent"
viewName = "View3"
viewOrientation = :front
origin = Point(Me.width/4,Me.height/3,0)
viewScale = scale
viewStyle = :hiddenLine
model = viewmodel.rightWall
hiddenParts = viewmodel.rightWall.sideWallHiddenParts
End Child
You should be able to do something similar to hide the patterns.
Make a list using isKindOf?() and look for IvAssemblyPattern, IvCircularOccurrencePattern, IvFeatureOccurrencePattern, or IvRectangularOccurrencePattern
I hope this helps
thank you for your answer,
I made the list of parts to hide but it doesn't work for the parts that are in a pattern.
I think I will replace my pattern by a childlist even if it is slower.
Nicolas