Hello,
I tried to use the script fromhttps://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
Hi
See here on how that can be done.
https://discuss.ansys.com/discussion/2308/how-can-i-assign-a-material-to-multiple-bodies-in-spaceclaim?utm_source=community-search&utm_medium=organic-search&utm_term=material
All the best
Erik
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.
@Gabriel Messager and @Nikos Kallitsis any feedback to the above question?
@Indrajit Below is an example to create your material and define its properties
newMat=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)