Get type from selection in menu popup item.

How to find "SelectType" in AddMenuPopupItem4 if i select component or subassembly in main assembly feature manager tree?

SolidworksApi macros