Add Prefix and Suffix to Dimension

Hi Guys,

Good day, is there a way to add prefix or suffix to dimension?

Thanks

Hi Joel, That is the Type Prefix parameter.

The instance ones (where you double click on the dim text) are instance properties not parameters.

RiR-Dim-Prefix-Suffix.gh (7.5 KB)

Similar to your override text value question earlier, this works on a single dimension, not a string (per the remarks)

“This property is for use with single-segmment dimensions only. For multi-segment dimensions use the corresponding properties of the DimensionSegment class.”

Thank you Japhy, kind regards.

Hi Japhy,

Can we do this one as well to Revit text? adding prefix or suffix? thanks

Hi @Joel_Ocampo

would something like this work for you? You can use the concatenate component to create suffixes or prefixes for Revit texts.

Add suffix_01.gh (7.6 KB)

Thank you Fernando, is the graphic element is the Revit text being selected and the context of it added this suffix?

Thanks

Does it have to be Text? A Generic Annotation can have Prefix or Suffix, or you can add an additional label as Prefix/Suffix.

Yes Japhy, it is the Revit Note text that l would like to add a prefix or suffix not a Revit family, thanks.

Hi Japhy, what would I need to change your script to work with multi-segment dimensions? Can you help me out on that? :pray:

Hi Lukas,

Here is something to get you started…


RiR-DimSegments-Prefix-Suffix.gh (7.2 KB)

:star_struck:
Hi Japhy, thank you so much!
This is now setting all segments of a dimension.

I just want to set ether a single segments of a dimension or multiple seperatly selected segments. (you can select seperat segments with the TAB key)


Do you see also see a way to achive this?

Maybe you can also point me to a good resource to getting started with the Revit API, Rhino.InsidenRevit and Python?
This would be a great next step for me to be able to exted some features myself.

Thanks you for your quick and very helpful replies :blue_heart:

Glad i could help, my python and Revit api knowledge is rudimentary.

A good place to start is the pyrevit playlists

There are lots of paid training out there as well…

Hi @Japhy

I just noticed that “Dimension Text” has its own component in the upcoming RiR release. :tada:

While testing it, I discovered that the “active selection” component doesn’t seem to differentiate between individual segments of a dimension being selected. It always returns the entire dimension string. Is there a way to get the selected segments (sub-elements)?

Thanks again :pray: