Identifying tear-off menus

Tear-off menus have the type “Menu Window”, and GetAttribute returns the name of the tear-off menu no matter what string you pass in.

si = Application
for v in si.Desktop.ActiveLayout.Views:
	if v.Type == "Menu Window":
		print v.GetAttributeValue("!@#$@!#$!")


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s