ideally, i would receive "ControlGrid44_4" when checking "TypeId", but i receive a generic 'Part::FeaturePython'.
i could use the truncated object name to check against, but that feels clumsy
i really wish i could get the string portion of "obj.Proxy.__class__" shown below, which would result in "ArachNURBS.ControlGrid44_4", but i can't figure out how to access this string (also a bit convoluted)
i have considered adding an attribute for the type to the objects themselves, but it will lead to lots of additional sorting and exceptions
does anyone have a simple solution to identify a python feature type?
Code: Select all
>>> obj = App.getDocument("Ellipsoid_Cap_04").getObject("ControlGrid44_4001") >>> obj.FullName 'Ellipsoid_Cap_04#ControlGrid44_4001' >>> obj.Name 'ControlGrid44_4001' >>> obj.TypeId 'Part::FeaturePython' >>> obj.Label 'ControlGrid44_4001test' >>> obj.Proxy <ArachNURBS.ControlGrid44_4 object at 0x7f7ca49a3550> >>> obj.Proxy.__class__ <class 'ArachNURBS.ControlGrid44_4'>