Hello everyone
Can anyone guide me on how to change the dimension text value for multiple dimensions at once? Please see the attached image below. I want to toggle between those options using Dynamo.
Gelöst! Gehe zur Lösung
Gelöst von robert2JCCH. Gehe zur Lösung
I'm not sure you'll find node that will do exactly that, likely you'll have to write a Python node that is using API methods such as:
Dimension.ValueOverride
or
DimensionSegment.ValueOverride if it is a multi segment dimension (using Dimension.NumberOfSegments to iterate Dimension.Segments).
It will likely set overridden or not depending on if you provide something or null to the ValueOverride property I expect.
As with the UI you'll have to provide a text value that isn't something that looks like a number or normal dimension value alone.
Ask the question on dynamo forum and perhaps someone will provide a Python code example, it is fairly easy to do. Alternatively become self taught via https://primer2.dynamobim.org/ etc.
However generally it is a bad workflow to replace dimension values with text.
Here a concept.
\
.
You will have to find a way which dimensions to change
Dimension.SetValueOverride to change the value
Dimension.ValueOverride to ask what the valueoverride is
Louis
Please mention Revit version, especially when uploading Revit files.
Here two ways
Louis
Please mention Revit version, especially when uploading Revit files.
How can you do this if you want to override only a segment of a dimension. Let's say like you want to override the first and last segment.
I know Rhythm can isolate the segments, but I could not find a way to override their values.
Proof of concept. Multi-segment dimensions are lists. The override node also accepts lists.
To only override the first/last segment, you can use something like Clockwork package's ReplaceItemAtIndex+ (allows multiple list replacements by indices)
EDIT: So I realized after posting that this still overrides the middle values, which is not good if those values change in the model (even if they're initially 'correct'). I'll look around to see if there's a package library that can isolate override state for each list item.
EDIT EDIT:
It's nulls. You put nulls in where you don't want to override the text.
@robert2JCCH it worked like a charm!
Used ReplaceByCondition to replace the values I wanted overriden, and to replace the others with null!
Thank you very much!
Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.