Reply

How change the material of partdocument

I have a programming to change partdocumet material,but it only can change the material name.

Set objDoc = objApp.Documents.Open(strFileName)

Set objPropertySets = objDoc.Properties

objPropertySets.Item("MechanicalModeling").Item("Material").Value = MaterialName

objDoc.Save

who can help me to sove this problem?

 

Posted by: zxm342500
Post date: 2/2/2013 9:28:45 PM

1 REPLY

How change the material of partdocument

Use the ApplyMaterial command

 

my example:

objApp = GetObject(, "SolidEdge.Application")

objSEPart = objApp.ActiveDocument

 

strPropVal = lstMatl.Text

objMatTable = objApp.GetMaterialTable

objMatTable.ApplyMaterial(objSEPart, strPropVal)

 

Posted by: Mark Spencer
Post date: 2/4/2013 7:35:58 AM