# Write parameter value as read only

**URL:** <https://forum.dynamobim.com/t/write-parameter-value-as-read-only/112763>\
**Category:** Revit\
**Tags:** python, dynamo\
**Created:** [October 21, 2025, 4:24pm UTC](https://forum.dynamobim.com/t/write-parameter-value-as-read-only/112763 "2025-10-21T16:24:18Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ning.zhouHNQLJ](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ning.zhouhnqlj/32/201653_2.png) [@ning.zhouHNQLJ](https://forum.dynamobim.com/u/ning.zhouHNQLJ)\
**Post date:** [October 21, 2025, 4:24pm UTC](https://forum.dynamobim.com/t/write-parameter-value-as-read-only/112763/1 "2025-10-21T16:24:18Z")

</div>

i created instance project parameters and write values via coding, need to be read-only for obvious reason, in UI, you can use formula like “= 123” to make it read-only, how to achieve it in Dynamo/Python, i assume API’s SetValueString is the way.

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [October 21, 2025, 6:34pm UTC](https://forum.dynamobim.com/t/write-parameter-value-as-read-only/112763/2 "2025-10-21T18:34:29Z")

</div>

There are options in a Shared Parameter file i think

But a Key Schedule makes people think twice, that should do it

---

<div class="post-metadata">

**Author:** ![ning.zhouHNQLJ](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ning.zhouhnqlj/32/201653_2.png) [@ning.zhouHNQLJ](https://forum.dynamobim.com/u/ning.zhouHNQLJ)\
**Post date:** [October 21, 2025, 6:41pm UTC](https://forum.dynamobim.com/t/write-parameter-value-as-read-only/112763/3 "2025-10-21T18:41:44Z")

</div>

right, but i don’t want to use SP unless it’s the only way

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [October 21, 2025, 6:48pm UTC](https://forum.dynamobim.com/t/write-parameter-value-as-read-only/112763/4 "2025-10-21T18:48:32Z")

</div>

What’s the “obvious reason” for locking down the parameter? This seems odd for a project parameter since you’d have to set the value for every instance and, as far as I’m aware, you can only use formulas in the family environment. Can you share more info on what you’ve done and what you’re wanting to accomplish?

---

<div class="post-metadata">

**Author:** ![ning.zhouHNQLJ](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ning.zhouhnqlj/32/201653_2.png) [@ning.zhouHNQLJ](https://forum.dynamobim.com/u/ning.zhouHNQLJ)\
**Post date:** [October 21, 2025, 7:03pm UTC](https://forum.dynamobim.com/t/write-parameter-value-as-read-only/112763/5 "2025-10-21T19:03:26Z")

</div>

value is calculated on the fly when creating that element (in-place family) via coding, user may modify that value afterwards which is not desired (because any other value is incorrect)

[Railing along path - Revit - Dynamo](https://forum.dynamobim.com/t/railing-along-path/112460/19)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [October 21, 2025, 8:50pm UTC](https://forum.dynamobim.com/t/write-parameter-value-as-read-only/112763/6 "2025-10-21T20:50:32Z")

</div>

Right, but how are you applying a formula to project parameter on an in-place element? How would you do this via the UI?

Project parameters get created and assigned without a value, so you’d have to have at least one way to modify the value after the parameter is created on an instance by instance basis. This is where you suggested a formula, but formulas for parameter values are only available in the family editor. If you want to lock a dimensional parameter, you could create a dimension and lock the actual dimension rather than the parameter itself.

---

<div class="post-metadata">

**Author:** ![ning.zhouHNQLJ](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ning.zhouhnqlj/32/201653_2.png) [@ning.zhouHNQLJ](https://forum.dynamobim.com/u/ning.zhouHNQLJ)\
**Post date:** [October 21, 2025, 9:43pm UTC](https://forum.dynamobim.com/t/write-parameter-value-as-read-only/112763/7 "2025-10-21T21:43:33Z")

</div>

i need to figure out how to do it in coding (before or after that in-place family got created), no way to use dimension lock.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/e/4ed9b4aac2820830abad44b95b2c62a4633c2ff5.jpeg)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [October 21, 2025, 9:50pm UTC](https://forum.dynamobim.com/t/write-parameter-value-as-read-only/112763/8 "2025-10-21T21:50:45Z")

</div>

I don’t think what you’re asking is possible. That’s why I’m asking for a “manual” process first. If you can do it through the UI then we have a much better chance of “automating” that process through the API. If it’s not possible through the UI, then we know there’s not even an API option to automate.

---

<div class="post-metadata">

**Author:** ![Mike.Buttery](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mike.Buttery](https://forum.dynamobim.com/u/Mike.Buttery)\
**Post date:** [October 22, 2025, 1:07am UTC](https://forum.dynamobim.com/t/write-parameter-value-as-read-only/112763/9 "2025-10-22T01:07:08Z")

</div>

Can you pin the elements? (and ‘educate’ your users?)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [October 22, 2025, 7:52am UTC](https://forum.dynamobim.com/t/write-parameter-value-as-read-only/112763/10 "2025-10-22T07:52:47Z")

</div>

> [@ning.zhouHNQLJ](#):
>
> value is calculated on the fly when creating that element (in-place family) via coding

Make the shared parameter only accessible via the API. [Revit API 2026 Documentation](https://revapidocs.com/2026.htm?id=4568f90c-7d4b-c9f2-da59-1540ca14a22f.htm)

---

<div class="post-metadata">

**Author:** ![ning.zhouHNQLJ](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ning.zhouhnqlj/32/201653_2.png) [@ning.zhouHNQLJ](https://forum.dynamobim.com/u/ning.zhouHNQLJ)\
**Post date:** [October 22, 2025, 2:50pm UTC](https://forum.dynamobim.com/t/write-parameter-value-as-read-only/112763/11 "2025-10-22T14:50:37Z")

</div>

SP works great.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/b/cbe285cf60efe869d05a80683f16cb20c236a38e.png)
