programmatically identify object types in Gizmo plot?
Dave_S
I'm plotting multiple surfaces in a Gizmo window, and making a panel for users to change the surfaces' color tables. This panel has a popup menu of objects plotted in the Gizmo window. However, this list includes axes, etc that don't have color tables.
Is there an easy way to identify whether or not Gizmo objects are type "surface"?
To populate the PopUpMenu I'm using
GetGizmo ObjectNameList
and then populating it with the results in S_ObjectNames
. The only other option I found that might work is using GetGizmo ObjectList
, searching through the returned string for instances of "surface="
and isolating the portion between preceding and subsequent semicolons. Then stripping out the portion of that command that defines name=
and storing that as an item in the list. Then iterating again...But that seems a bit clunky. Any better ideas? I attached a preliminary file with what I've got so far. Feel free to correct or point me in the right direction.
Thanks,
Dave
I'm afraid there is no easy way to accomplish your task without parsing the recreation macro so your approach is basically correct.
A.G.
WaveMetrics, Inc.
January 19, 2015 at 10:05 am - Permalink