Cancel
Showing results for 
Search instead for 
Did you mean: 

how to change face style, or assign special color to part?

Valued Contributor
Valued Contributor

how to change face style, or assign special color to part? 

i use vb.net. the code is like this:

 

objApplication =GetObject(, "SolidEdge.Application")

objDocument = objApplication.ActiveDocument

objFaceStyle = objDocument.Properties

objFaceStyle.Item("MechanicalModeling").Item("Face Style").Value = "Green"

 

but it can't change. how can i do?

 

Posted by: Ben chen
Post date: 6/20/2011 2:10:38 AM

2 REPLIES 2

RE: how to change face style, or assign special color to part?

Valued Contributor
Valued Contributor

In SE 18 works this:

for faces...

Set ObjModel = ObjPartDoc.Models(1)

Set ObjBody = ObjModel.Body

Set ObjFaces = ObjBody.Faces(igQueryAll)

ObjFaces.Item(30).Style = ObjPartDoc.FaceStyles("steel")

for whole body...

ObjBody.Style = ObjPartDoc.FaceStyles(Color)

 

Also you can assign material from material table (material has colour)

Call ObjMattable.ApplyMaterial(ObjPartDoc, MatTabName)

 

Posted by: Jiri Marek
Post date: 6/28/2011 7:37:16 PM

RE: how to change face style, or assign special color to part?

Valued Contributor
Valued Contributor

thank you

 

Posted by: Ben chen
Post date: 6/29/2011 2:17:36 AM