Hello everyone,
I created a script to change the colors of bodies but mistakenly I also changed all the other features.
this is the script text:
Sub CATMain()
'------------------------------------------------------
Dim sSel As Selection
Set sSel = CATIA.ActiveDocument.Selection
'show all MechanicalFeature
sSel.Search "CATPrtSearch.MechanicalFeature,all"
sSel.VisProperties.SetRealColor 210, 210, 255, 1
sSel.Clear
sSel.Search "CATPrtSearch.MechanicalFeature.Visibility=Invisible,all"
sSel.VisProperties.SetShow 0 '0visible
sSel.Clear
sSel.Search "CATProductSearch.Part.Visibility=Invisible,all"
sSel.VisProperties.SetShow catVisPropertyNoShowAttr
sSel.Clear
sSel.Search "CATAsmSearch.Product,all"
sSel.VisProperties.SetShow catVisPropertyShowAttr
sSel.VisProperties.SetRealColor Auto,Auto,Auto,Auto
sSel.VisProperties.SetRealOpacity 255, 1
sSel.Clear
sSel.Search "CATProductSearch.Part,all"
sSel.VisProperties.SetShow catVisPropertyShowAttr
sSel.VisProperties.SetRealColor 210, 210, 255, 1
sSel.VisProperties.SetRealOpacity 255, 1
sSel.Clear
'modify bodyfearure properties
sSel.Search "CATPrtSearch.BodyFeature,all"
sSel.VisProperties.SetShow catVisPropertyShowAttr
sSel.VisProperties.SetRealColor 210, 210, 255, 1 'grigio catia
sSel.VisProperties.SetRealOpacity 255, 1 '255 opaco-0 trasparente,
sSel.Clear
End Sub
Can you suggest me how can I reset all to the default colors? (In particular I need to reassign the original green color of constraints).
Thank you.
I created a script to change the colors of bodies but mistakenly I also changed all the other features.
this is the script text:
Sub CATMain()
'------------------------------------------------------
Dim sSel As Selection
Set sSel = CATIA.ActiveDocument.Selection
'show all MechanicalFeature
sSel.Search "CATPrtSearch.MechanicalFeature,all"
sSel.VisProperties.SetRealColor 210, 210, 255, 1
sSel.Clear
sSel.Search "CATPrtSearch.MechanicalFeature.Visibility=Invisible,all"
sSel.VisProperties.SetShow 0 '0visible
sSel.Clear
sSel.Search "CATProductSearch.Part.Visibility=Invisible,all"
sSel.VisProperties.SetShow catVisPropertyNoShowAttr
sSel.Clear
sSel.Search "CATAsmSearch.Product,all"
sSel.VisProperties.SetShow catVisPropertyShowAttr
sSel.VisProperties.SetRealColor Auto,Auto,Auto,Auto
sSel.VisProperties.SetRealOpacity 255, 1
sSel.Clear
sSel.Search "CATProductSearch.Part,all"
sSel.VisProperties.SetShow catVisPropertyShowAttr
sSel.VisProperties.SetRealColor 210, 210, 255, 1
sSel.VisProperties.SetRealOpacity 255, 1
sSel.Clear
'modify bodyfearure properties
sSel.Search "CATPrtSearch.BodyFeature,all"
sSel.VisProperties.SetShow catVisPropertyShowAttr
sSel.VisProperties.SetRealColor 210, 210, 255, 1 'grigio catia
sSel.VisProperties.SetRealOpacity 255, 1 '255 opaco-0 trasparente,
sSel.Clear
End Sub
Can you suggest me how can I reset all to the default colors? (In particular I need to reassign the original green color of constraints).
Thank you.