Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change edge color of a Body? 1

Status
Not open for further replies.

Lea75

Mechanical
Feb 24, 2009
51
ES
Hello everybody.
I need to change the color of the edges of one body in CatPart.
I was able to change the filling of it to black with: oVisproperties.SetRealColor 0, 0, 0, 0
But now I need to change the edges to white.
I looked for it everyware but I had no luck.
Is it possible?
Thank you in advance for any tip.
Regards
 
Replies continue below

Recommended for you

how about this:
Code:
oVisproperties.SetRealColor 255, 255, 255, 0
 
Hello,

Not sure I understand your problem but White's RGB values are 255,255,255.

Calin
 
This is my code to set the filling of the main Body to black:
**************************************************
Set oSelection = CATIA.ActiveDocument.Selection
oSelection.Add oPartDocument.Part.Bodies.Item(1)
Set oVisproperties = oSelection.VisProperties
oVisproperties.SetRealColor 0, 0, 0, 0
**************************************************

I already know that 255,255,255 is the RGB for white, but
which should be the code for changing the color of lines (edges) of the main Body?
 
Any suggestion about this?
I'm still stucked on this.
Thank you in advance
 
Hi.

With Selection you basically do things just like you would do them by hand. That is you have to select edges before setting color. It can easily be done with Search:

oSelection.Add oPartDocument.Part.Bodies.Item(1)
oSelection.Search "CATTopology.CGMEdge,sel"
oSelection.VisProperties.SetRealColor 255, 255, 255, 0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top