Reply

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

[ Edited ]

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

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

[ Edited ]

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?

[ Edited ]

thank you

 

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