Graphics objects in references

Graphics objects in references can be addressed using setValue() and getValue() as well as using the "dot" operator.

To set the attributes of a graphics object in a reference, select the Select Shape/Group... option from the Edit menu. The Select Shape/Shape Group/Panel Ref window opens. Select here the desired object. Now you can, for example, set the color of the object.

To change or read the attributes of a graphic object in another reference, it is possible to access them using referenceName.shapeName within of setValue() or getValue(). With the function getShapes() a list of shape names (or RefName.ShapeName) is returned. The returned names can be used to address the graphics objects.

Example

This function sets the ellipse of a reference to the background color red. The first parameter is the graphic's name, the second the graphic's attribute and the third parameter a valid value.

main()
{
  setValue("Ellipse", "backCol", "Red");
}

The graphics object with the name "graphics_example" is set to invisible.

main()
{
  graphics_example.visible(FALSE);
}

This example shows how to address graphics objects in references (or references in references) with setValue() from a panel.

The first function sets the background color of RECTANGLE1 in the reference Ref1 to red. The second function changes the background color of ELLIPSE1 of ref2 which is embedded in ref1.

main()
{
  setValue("Ref1.RECTANGLE1", "backCol", "red");
  setValue("Ref1.Ref2.ELLIPSE1", "backCol", "blue");
}