Viewport type name

I am able to extract the information for any View with Python as below:

I am trying to do the same thing with viewport but I do not know how to do it.
Any help is greatly appreciated.
Thanks in advance!

VpType = doc.GetElement(viewport.GetTypeId())
vpName = Element.Name.get(VpType)

1 Like

Hi @ashafaB6HDZ
Try also the great “Rhythm” package, there is a node for that, or instead OOTB node “element get parameter value by name” (but not if the viewport came from Schedule).

Thanks Sean,
I tried it but doesn’t work:

It is a formatting thing with the forum.

#There are 2 "_" underscores on each side of get
for vpType in vpTypes:

Thank you.
I finally resolved it this way:


1 Like