Add Dimension Prefix for all similar type in the Project


We want to Show the BOD for ducts, BOP for Pipes, BOCT for Cable trays. We have many dimensions where we need to add these info as prefix. I checked the blog, but i am unable to achieve the result.

Could anyone help me with a node / script which can select all the dimensions of Type - ALM_BOD and add prefix to it as BOD?

check this post… solved by @Vikram_Subbaiah

and this post… solved by @john_pierson

1 Like


I tried with the script, it is not working. Please check the attached video & Snapshot. I am selecting the elements,
it is not doing the update.

Do i need any additional package?

Also, i am looking for way to select all dimensions of specific type and add specific Prefix.

Please test your copy paste function… It worked perfectly for me!

Below is a solution that takes dimension type into consideration.
dimensionPrefix.dyn (9.5 KB)

import clr
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument

dims = UnwrapElement(IN[0])
pfix = IN[1]

for i in dims :
	if i.Value >= 0 :
		i.Prefix = pfix
	else :
		for j in i.Segments :
			j.Prefix = pfix

#no Output is needed

Thank You very much. It worked very vell