# Change scale display name

**URL:** <https://forum.dynamobim.com/t/change-scale-display-name/41738>\
**Category:** Revit\
**Created:** [October 11, 2019, 8:31pm UTC](https://forum.dynamobim.com/t/change-scale-display-name/41738 "2019-10-11T20:31:40Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![glenncai](https://avatars.discourse-cdn.com/v4/letter/g/dc4da7/32.png) [@glenncai](https://forum.dynamobim.com/u/glenncai)\
**Post date:** [October 11, 2019, 8:31pm UTC](https://forum.dynamobim.com/t/change-scale-display-name/41738/1 "2019-10-11T20:31:40Z")

</div>

Is it possible to active and set the scale display name? Don’t know why Revit lookup indicated the parameter is read only while the value can be modify manually.  
 ![nts-1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/5/d562f5a8abff5b1fcaa94e729ff06afa046142b2.jpeg)

 ![nts-2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/b/ab233c7ae54da0372203246d9470f2c7e66e2298.jpeg)

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [April 20, 2022, 8:35pm UTC](https://forum.dynamobim.com/t/change-scale-display-name/41738/2 "2022-04-20T20:35:50Z")

</div>

First of all. Apologies for reviving this 2.5 year old thread. But, I stumbled on this while messing with it too.

* * *

The actual BuiltInParameter name is `VIEW_SCALE_CUSTOMNAME`, and the below python should do it:

````auto
# Load the Python Standard and DesignScript Libraries
import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument

viewports = UnwrapElement(IN[0])
override = IN[1]

TransactionManager.Instance.EnsureInTransaction(doc)
params = []
for v in viewports:
	pa = v.get_Parameter(BuiltInParameter.VIEW_SCALE_CUSTOMNAME)
	pa.Set(override)
	params.append(pa)
	
TransactionManager.Instance.TransactionTaskDone()

# Assign your output to the OUT variable.
OUT = viewports```

---

I found this using the button on the bottom left of Revit Lookup, built In Enums snoop
````

---

<div class="post-metadata">

**Author:** ![glenncai](https://avatars.discourse-cdn.com/v4/letter/g/dc4da7/32.png) [@glenncai](https://forum.dynamobim.com/u/glenncai)\
**Post date:** [December 17, 2022, 6:52am UTC](https://forum.dynamobim.com/t/change-scale-display-name/41738/3 "2022-12-17T06:52:14Z")

</div>

HI John,  
Apologies for saying thanks late. need to change 50+ views to NTS today, and remeber this forgotten thread. I order to display custom name, BuiltInParameter.VIEW\_SCALE\_HAVENAME need set to 1

v.get\_Parameter(BuiltInParameter.VIEW\_SCALE\_HAVENAME).Set(1);

Thank you so much!

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [December 17, 2022, 7:44am UTC](https://forum.dynamobim.com/t/change-scale-display-name/41738/4 "2022-12-17T07:44:30Z")

</div>

That’s awesome! Glad it helped out. 🙌

---

<div class="post-metadata">

**Author:** ![broberts0814](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@broberts0814](https://forum.dynamobim.com/u/broberts0814)\
**Post date:** [January 26, 2023, 9:18pm UTC](https://forum.dynamobim.com/t/change-scale-display-name/41738/5 "2023-01-26T21:18:39Z")

</div>

Hey guys, just found this thread as I also have a ton of views to change scale names on. @glenncai I see your response about needing to add the “view\_scale\_havename” parameter. My question is where did you add the in the python script above?

---

<div class="post-metadata">

**Author:** ![glenncai](https://avatars.discourse-cdn.com/v4/letter/g/dc4da7/32.png) [@glenncai](https://forum.dynamobim.com/u/glenncai)\
**Post date:** [January 26, 2023, 10:07pm UTC](https://forum.dynamobim.com/t/change-scale-display-name/41738/6 "2023-01-26T22:07:08Z")

</div>

right after set VIEW\_SCALE\_CUSTOMNAME parameter  
pa = v.get\_Parameter(BuiltInParameter.VIEW\_SCALE\_CUSTOMNAME)  
pa.Set(“Custom View Scale Name”)  
v.get\_Parameter(BuiltInParameter.VIEW\_SCALE\_HAVENAME).Set(1)

---

<div class="post-metadata">

**Author:** ![broberts0814](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@broberts0814](https://forum.dynamobim.com/u/broberts0814)\
**Post date:** [July 12, 2023, 3:40pm UTC](https://forum.dynamobim.com/t/change-scale-display-name/41738/7 "2023-07-12T15:40:22Z")

</div>

So, I have the code loaded into a Python script, however it fails when I run it. Below is the code:

````auto
# Load the Python Standard and DesignScript Libraries
import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

# The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN

# Place your code below this line

clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument

viewports = UnwrapElement(IN[0])
override = IN[1]

TransactionManager.Instance.EnsureInTransaction(doc)
params = []
for v in viewports:
	pa = v.get_Parameter(BuiltInParameter.VIEW_SCALE_CUSTOMNAME)
	pa.Set(“Custom View Scale Name”)
	v.get_Parameter(BuiltInParameter.VIEW_SCALE_HAVENAME).Set(1)
	
TransactionManager.Instance.TransactionTaskDone()

# Assign your output to the OUT variable.
OUT = viewports```

````

Any ideas as to why it’s failing?

---

<div class="post-metadata">

**Author:** ![glenncai](https://avatars.discourse-cdn.com/v4/letter/g/dc4da7/32.png) [@glenncai](https://forum.dynamobim.com/u/glenncai)\
**Post date:** [December 14, 2023, 5:39pm UTC](https://forum.dynamobim.com/t/change-scale-display-name/41738/8 "2023-12-14T17:39:09Z")

</div>

Hi, Sorry for late reply. your code work fine for me, What error message did you get?

---

<div class="post-metadata">

**Author:** ![Rene\_Pellicer\_Garcia](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/rene_pellicer_garcia/32/72467_2.png) [@Rene\_Pellicer\_Garcia](https://forum.dynamobim.com/u/Rene_Pellicer_Garcia)\
**Post date:** [March 26, 2024, 1:09pm UTC](https://forum.dynamobim.com/t/change-scale-display-name/41738/9 "2024-03-26T13:09:00Z")

</div>

Hey, I needed to change the display name for approx. 300 drafting views today and this is what worked for me:

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