Setting Material Parameter Not Working

matthew_conwayN7C2G
Enthusiast

Setting Material Parameter Not Working

matthew_conwayN7C2G
Enthusiast
Enthusiast

I have a C# Command that is creating Materials in Revit. You can see in the image below I'm successfully creating a new material and setting all the Physical Parameters in yellow without issue. However, I'm having issues setting the "Tension Parallel to Grain" Parameter.

 

I'm getting that Parameter using the BuiltInParameter.PHY_MATERIAL_PARAM_SHEAR_PERPENDICULAR. When I attempt to ".Set(500);" the Parameter, it is returning false. I noticed that the UserModifiable attribute of the Parameter is "false". So I have two questions:

1) Is it possible to set a Parameter that is marked as UserModifiable:false? I noticed in the API docs, it mentions this Parameter can't be modified by the UI, but I am able to Modify it using the UI. Do I have the wrong Parameter? (The Parameter name matches the "Tension Parallel to Grain" name).

2) How do I set the "Tension Parallel to Grain" Parameter?


MicrosoftTeams-image.png

0 Likes
Reply
397 Views
1 Reply
Reply (1)

moturi.magati.george
Autodesk
Autodesk

Hi @matthew_conwayN7C2G,

 

@jeremy_tammik had done a blog indicating that the parameter cannot be modified a few years ago here https://thebuildingcoder.typepad.com/blog/2013/01/read-material-asset-parameter.html

I have asked the development team for you on the same.


 

  Moturi George,     Developer Advocacy and Support,  ADN Open