Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Member Login

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Eng-Tips
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I'm so glad I found this site... Now I can get some sleep, because my problem is solved..."

Geography

Where in the world do Eng-Tips members come from?

CATScript - Keeping a Selection, but not Highlighting itHelpful Member!(2) 

jmarkus (Mechanical)
19 Jul 12 20:28
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
jmarkus (Mechanical)
20 Jul 12 16:30
Alternately, does anyone know how to change the selection color to BLACK in a CATScript?

Thanks,
Jeff
ferdo (Mechanical)
23 Jul 12 5:33
Hi,

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

jmarkus (Mechanical)
23 Jul 12 8:48
Thanks Fernando, but I don't want to change the object color. I just want to either (a) turn off highlighting when something is selected OR (b) change the color CATIA uses for highlighting (which I can find under Tools->Options->Display->Visualization->Selected Elements - but I don't know how to change using the CATScript.

Jeff
Helpful Member!  ferdo (Mechanical)
23 Jul 12 9:49
OK, maybe this will help you.

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

jmarkus (Mechanical)
24 Jul 12 15:06
For some reason I thought my code needed to "remember" the selection, so I didn't want to clear it. But then I thought about your point and realized my item still exists so I can Add it again after clearing it to do other operations.

So thanks again,
Jeff
Helpful Member!  cnc07 (Aerospace)
26 Aug 12 0:31
Hi,

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

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!

Back To Forum

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close