CATScript - Keeping a Selection, but not Highlighting it
CATScript - Keeping a Selection, but not Highlighting it
(OP)
Is there a way to prevent CATIA from highlighting a selection in a CATSCript? I want to keep my selection while I am taking screen shots, but I don't want the selection to be highlighted in the screen shot.
Thanks,
Jeff
Thanks,
Jeff





RE: CATScript - Keeping a Selection, but not Highlighting it
Thanks,
Jeff
RE: CATScript - Keeping a Selection, but not Highlighting it
Search for RGB Color Chart on Internet. In the Grays table you will get:
Color Name RGB CODE HEX #
Black 0-0-0 000000
Dark Slate Gray 49-79-79 2f4f4f
Dim Gray 105-105-105 696969
Slate Gray 112-138-144 708090
Light Slate Gray 119-136-153 778899
Gray 190-190-190 bebebe
Light Gray 211-211-211 d3d3d3
So, changing to black it will be something like:
Dim Obj As VispProperties
Set Obj = Selection.VisProperties
Obj.SetRealColor 0,0,0,0
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
RE: CATScript - Keeping a Selection, but not Highlighting it
Jeff
RE: CATScript - Keeping a Selection, but not Highlighting it
Selection1.Search "CatPrtSearch.Plane,All" 'search and select planes for example
Set visPropertySet1 = Selection1.visProperties
VisPropertySet1.SetShow 1 'hide planes
Selection1.Clear 'clear selction
Now you can capture screen without selection done
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
RE: CATScript - Keeping a Selection, but not Highlighting it
So thanks again,
Jeff
RE: CATScript - Keeping a Selection, but not Highlighting it
If you want to reuse the selected items and at the same time you want to clear the selection then there is another solution which I have used successfully in the machining workbench.
Below is a code snippet where I selected some machining-operations(from the catprocess document) and then stored them in a Collection. With this approach you can select the objects and clear the selection as many times as you want. And then you can recall the items from the collections in the same way you do it with Selection. Hope this helps you.
Dim sourceMOsCollection1 As New Collection
For i = 1 To selection1.Count
Set CurrentActivity = selection1.Item2(i).Value
If CurrentActivity.Type <> "PPInstruction" Then
sourceMOsCollection1.Add selection1.Item2(i).Value
End If
Next