Is there a clean way to tell if a shape in a cellview is part of a ROD (actually MPP is what I'm interested in but other forum answers talk about that piece).
when(shape_is_part_of_rod(fig) ;; <--- any simple way to do this?
printf("I am a %L that is part of a ROD\n", fig->objType)
I can picture some crazy things like making a table that I populate with all shapes by iterating on RODs and then subShapes and then see if a given figure ID is found in that big table but that seems like a lot of work for a simple check.
I don't think there is a simple function to do this. I searched back and found I'd answered this as follows for a customer a few years ago:
The only way I can think of doing this is to do something like:procedure(abIsObjPartOfMPP(obj) (rodGetObj(obj) || exists(rodId rodGetNamedShapes(obj~>cellView) member(obj rodId~>subShapes) )) && t)If doing this repeatedly, it would probably be more efficient to cache all the subShapes in a table so you can use a hash lookup instead of using member (which will be less efficient). But I'll leve that as an exercise for you!
Thanks. I ended up iterating over the MPPs and then over the subShapes and put them in a table to be able to lookup the dbID of the main MPP from any of the sub shapes.