.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

change color of faces

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
612 Views, 3 Replies

change color of faces

hi, how can we change the color of a face ? i tried to cast it into an entity but i guess face is not an entity? thanks.

3 REPLIES 3
Message 2 of 4
norman.yuan
in reply to: Anonymous

Are you talking about Autodesk.AutoCAD.DatabaseServices.Face class?

 

Face object is an Entity (e.g. Face class is derived from Entity class). You can see it clearly in Object Browser of VS:

 

Untitled.jpg

 

Therefore you should be able to change its color as you do with any entity of other types (via Face.Color or Face.ColorIndex property). No need to cast it to Entity class

Norman Yuan

Drive CAD With Code

EESignature

Message 3 of 4
Anonymous
in reply to: Anonymous

It is actually Autodesk.AutoCAD.BoundaryRepresentation.Face; so i can't do that can i?

 

Message 4 of 4
norman.yuan
in reply to: Anonymous

BoundaryRepresentation.Face is an BrepEntity, which has a SubentityPath property. I guess you would go after this property to find out what entity (or entities) is used to form the Face

Norman Yuan

Drive CAD With Code

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost