ST7 MP2 - Assign material

Phenom
Phenom

How do I assign material to a part in ST7 - MP2 ?

 

The code I did use up to ST7 - MP1 is not working anymore:

 

'objApp already connected to a running Solid Edge with a part loaded
'cMateriale.Text is a valid string

Dim objMatTable As MatTable Set objMatTable = objApp.GetMaterialTable objMatTable.SetActiveDocument objApp.ActiveDocument objMatTable.ApplyMaterial objApp.ActiveDocument, cMateriale.Text

 

Thanks

 

Francesco

2 REPLIES

Re: ST7 MP2 - Assign material

Phenom
Phenom

The "ApplyMaterialToDoc" method is working so I changed my code to use it.

 

Still a bug to deal with in my opinion.

Re: ST7 MP2 - Assign material

Phenom
Phenom
Not all the bugs comes without a reason.
I found that the "ApplyMAterialToDoc" method is much much faster than the previous one.

So now my program speed is greatly improved.