I am trying to get all of the Dimension overriding value(Override,Above,Below,Prefix,Suffix). And need a way to match Element ID to the item with the value. So far I can’t get Dimension Above and Below value to match the list sub- sequence of other the dimension override. It comes out as a flattened list. I think of using “any true” note to filter element ID.
First - I need dimension value for above and below, and the only way I know how is through the python script, which produced one flattened list from all the dimension element. With dimension node like “ValueOverride node” it gives all of the value per dimension element. The issue is that I can’t figure out a way to filter the dimension element with a flattened list of a different number of the sub list.
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
dataEnteringNode = IN
doc = DocumentManager.Instance.CurrentDBDocument
dims = UnwrapElement(IN[0])
result = list()
result1 = list()
TransactionManager.Instance.EnsureInTransaction(doc)
for i in dims:
if i.Value >= 0:
result.append(i.Above), result1.append(i.Below)
else:
for j in i.Segments:
result.append(j.Above), result1.append(j.Below)
TransactionManager.Instance.TransactionTaskDone()
So I think it’s easiest for you to do a bit more work within Python and get the information out in a list format which relates the values to each other and the host dimension…
I come upon another issue or more a question? So to get all of my data in the same format, I modify your code to include all the other dimension override value. The result comes out different from the Revit Valueoverrides node when I compare the two. Is that because of the python code only pull out one value from the segment dimension when the override value is the same for the whole segment.
Hi,
I am trying to Set dimension override value with multiple segments. I know there are nodes for each override value. I am trying to combine all the override to one python script. The problem is that when I list them (python script) they don’t change all of the set value except for the first set value
Can you format your python code correctly? Highlight all of the code and use the </> button, and double check all quotes/indents so that we can see the actual code.