Assign material name in Spaceclaim through script
Indrajit
Member Posts: 5
**
in Structures
Hello,
I tried to use the script from
https://discuss.ansys.com/discussion/2402/can-i-change-material-properties-in-spaceclaim-through-scripting
However it is not clear on how to set the material name instead of "Unknown Material"
could you please help.
Thanks,
Indrajit
0
Answers
-
Hi
See here on how that can be done.
All the best
Erik
0 -
Thanks Erik.
How do I actually get the material names in the local library. Do i have to manually add that or is there a smart way to add material names in local library.
0 -
@Gabriel Messager and @Nikos Kallitsis any feedback to the above question?
0 -
@Indrajit
Below is an example to create your material and define its propertiesnewMat=SpaceClaim.Api.V22.DocumentMaterial.Create(Window.ActiveWindow.Document,"my_mat",1e6) idCons=SpaceClaim.Api.V22.MaterialPropertyId prop1 = SpaceClaim.Api.V22.MaterialProperty(idCons.PoissonsRatio,"PR",0.3,None) newMat.SetProperty(prop1)
0