Property is read-only,how to change it using any method?

Property is read-only,how to change it using any method?

1039574776
Enthusiast Enthusiast
527 Views
2 Replies
Message 1 of 3

Property is read-only,how to change it using any method?

1039574776
Enthusiast
Enthusiast

As shown in the screenshot, the bottom elevation property of a vertical conduit. Now I want to change it, but this property is read-only, and I know that its value can be conduit.get_Parameter by method (BuiltInParameter.RBS_CTC_BOTTOM_ELEVATION). AsDouble(). Can anyone tell me how this read-only property can be re-assigned and set using the reflection method? thanks.

Conduit conduit = conduits.Last();
Parameter parameter = conduit.get_Parameter(BuiltInParameter.RBS_CTC_BOTTOM_ELEVATION);
double bottom_elevation= parameter.AsDouble();

picture20231218-1.jpg

 

0 Likes
528 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Alumni
Alumni

Most read-only properties are the result of other BIM parameters settings and constraints. So, the BIM contains some (hopefully useful, valid and sensible rule) that is determining the value of the read-only parameter. To change its value, you need to discover and understand the context that is defining its value, and modify that appropriately. That is what the BIM is all about.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 3

1039574776
Enthusiast
Enthusiast

picture20231219-2.jpg

Thank you for your kind reply. As you can see in the screenshot, I know that in the Revit 3D model, you can double-click on the bottom end of the vertical conduit to modify its bottom elevation. However, I would like to be able to modify the bottom elevation of the vertical conduit in the program, how can I do that?

 

0 Likes