Possible to control Viewport Title position?

Just found that Revit 2022 has added “LabelOffset” as property to Viewport.

So can we do something like this to control it’s position?

if isinstance(Viewport, DB.Viewport):
Centerpoint = Viewport.GetBoxCenter().ToPoint3d()
elif Viewport == None:
show_remark(“Please connect a DB.Viewport Element to the input.”)
show_warning(“Please connect a DB.Viewport Element to the input.”)

Here something to get you started.

RIR-ViewportLabelOffset.gh (11.0 KB)

As always, thank you very much @Japhy .

Something curious:

  1. What is the unit for XYZ? I thought that is the same as document unit?

  2. This one has been bothered me for a long time…
    What is exactly define the “Viewport” boundary?
    It seems to have a specific offset distance from crop region but don’t know where to control.

The offset is from the bottom left of the Crop Region. If there isn’t a crop region active it goes from the 100x100 default in this example.

Revit Internal Units are always going to Decimal Feet.