Viewport type name

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

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).
Cheers

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:
	names.Add(Element.Name.__get__(vpType))

Thank you.
I finally resolved it this way:

image

1 Like