I have a JavaScript macro that builds a diagram for me, but I am having trouble using CompartmentManager to display particular properties in the compartments of the drawn shapes. When I add the property manually via the Edit Compartment dialog, everything works and displays as expected, but I can’t seem to do this via the openapi macro.
CompartmentManager has the following method, which I suspect is the intended way to achieve this:
showCompartmentElement(PresentationElement view, java.lang.String compartmentID, Element element)
I understand how to get the presentation element and compartmentID for use with this method, but what element is the final argument expecting? Let’s say I wanted to display the standard ‘Name’ property in the Element Properties compartment, what would I pass as the element argument of CompartmentManager.showCompartmentElement to make this display? There isn’t an element that represents that particular Name property, is there? The value of Name is a string, not an element, so it wouldn’t be the value of the property either. Surely it isn’t the element that the shape represents, because that wouldn’t select the specific property I am after.
Any help would be appreciated, because nothing I am trying seems to actually display the element in the Element Properties compartment of the shape.
