Hi Michael,
das ist genau die Lösung, die ich auch gebrauchen kann. Und das sogar ohne gefragt zu haben. Danke!
Ich wollte über einen Parameter "Dimensions" mit den Werten "Hide" und "Show" ein paar Bemaßungen im Modell ein- und ausblenden. Über eine Reaction funktioniert das bestens.
Vielleicht interessierts jemanden:
Dim Selection As Selection
Dim constraint1 As Constraint
Dim constraint2 As Constraint
Dim strHideShow As String
strHideShow = parameter.Value
Set constraint1 = CATIA.ActiveDocument.Part.Constraints.Item("Width")
Set constraint2 = CATIA.ActiveDocument.Part.Constraints.Item("Height")
Set Selection = CATIA.ActiveDocument.Selection
Selection.Clear
Selection.Add constraint1
Selection.Add constraint2
if strHideShow = "Hide" then
Selection.VisProperties.SetShow catVisPropertyNoShowAttr
else
Selection.VisProperties.SetShow catVisPropertyShowAttr
end if
Selection.Clear
End Sub
------------------
Axel Dengler
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP