Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Changing Dimension Text Value using Dynamo

11 ANTWORTEN 11
GELÖST
Antworten
Nachricht 1 von 12
suganesh_matrix_a540
1756 Aufrufe, 11 Antworten

Changing Dimension Text Value using Dynamo

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.

 

suganeshmatrixa540_0-1691428186482.png

 

11 ANTWORTEN 11
Nachricht 2 von 12

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.

Nachricht 3 von 12

Thank you for your reply.
I don't know how to use API methods.
Nachricht 4 von 12

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.

Nachricht 5 von 12
L.Maas
als Antwort auf: suganesh_matrix_a540

Here a concept.

LMaas_0-1691430299962.png\

LMaas_1-1691430326683.png.

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

EESignature

Please mention Revit version, especially when uploading Revit files.

Nachricht 6 von 12

Thank you. Will do.
Its just in few locations i need them that way.
Nachricht 7 von 12
suganesh_matrix_a540
als Antwort auf: L.Maas

Thank you for that concept script! Will try it out.
Nachricht 8 von 12
suganesh_matrix_a540
als Antwort auf: L.Maas

How do it change it back to actual value of the dimension if its a text?
Nachricht 9 von 12
L.Maas
als Antwort auf: suganesh_matrix_a540

 

Here two ways

LMaas_1-1691432503873.png

 

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

Nachricht 10 von 12

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.

Nachricht 11 von 12

robert2JCCH_2-1710202022504.png

 

robert2JCCH_3-1710202098480.png

 


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.

Nachricht 12 von 12
edson.maruyama
als Antwort auf: robert2JCCH

@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.

In Foren veröffentlichen  

Autodesk Design & Make Report