Hello guys,
Im looking for a way to assign value to the assets of a material created by myself via API, any solutions? I will attach a picture of what I mean in order to make my explanation a bit more clear. I want to fill the text boxes with API.
Regards
JMGP
Solved! Go to Solution.
Solved by naveen.kumar.t. Go to Solution.
Hi @Anonymous,
Try using the below code
ElementId materialId = Material.Create(doc, "Material Name"); Material mat = doc.GetElement(materialId) as Material; mat.get_Parameter(BuiltInParameter.ALL_MODEL_COST).SetValueString("Cost value"); mat.get_Parameter(BuiltInParameter.ALL_MODEL_DESCRIPTION).Set("DESCRIPTION"); mat.get_Parameter(BuiltInParameter.ALL_MODEL_INSTANCE_COMMENTS).Set("COMMENTSSS"); mat.get_Parameter(BuiltInParameter.ALL_MODEL_MANUFACTURER).Set("MANUFACTURER NAME"); mat.get_Parameter(BuiltInParameter.ALL_MODEL_MARK).Set("MARK NAME"); mat.get_Parameter(BuiltInParameter.ALL_MODEL_URL).Set("URL AS STRING");
If this helped solve your problem please mark it as solution, so other users can get this solutions as well
Thanks for the answer @naveen.kumar.t is there any other class to assign a value to the properties of the other assets? Like the "Graphics" asset and "Physical". I know that the last package released for the "Appearance" asset and I found the one for the "Thermal" already.
Any information that is useful for this topic?
Regards,
JMGP
hi @Anonymous ,
try using the below link
material-assets-appearance-structural-physical-amp
Can't find what you're looking for? Ask the community or share your knowledge.