Contents - Index


GETDIAGRAMATTRIBUTE

 

GetDiagramAttribute('Name.XXXX') returns the value of attribute XXXX for a text item, object, or button in the Diagram window or child diagram window that has the specified name. The attributes are indicated with underline font in the properties menu. Typical attributes are .LEFT, .WIDTH, and .TOP.  Attribute .CHECKED is recognized for check boxes and radio button groups.  For a check box, GetDiagramAttribute returns either 0 (false#) or 1 (true#).  For a radio button group, it returns the number of the selected button with 1 being the first button.

 

Note that Name.XXXX is a string and it must be either a string constant or a predefined string variable.  If the specified name can not be found, this function returns -9999.  Knowing the value of an attribute in the Diagram window is particularly useful when moving objects such as during animation

 

Example 1:

{A picture is copied into the Diagram window and given the name myPicture.  The following equations return the attributes of myPicture.}

Xpos=GetDiagramAttribute('myPicture.left') 

YPos=GetDiagramAttribute('myPicture.top') 

Width=GetDiagramAttribute('myPicture.width') 

Height=GetDiagramAttribute('myPicture.height')

Angle=GetDiagramAttribute('myPicture.angle') 

Hidden=GetDiagramAttribute('myPicture.hide') 

 

Example 2:

{A check box with name docalcs is defined as shown below}

 

 

dotheCalculations=GetDiagramAttribute('docalcs.checked')  {returns 1 if checked or 0 if not checked}

 

 

 

 

See also:  DIAGRAMHEIGHT#

                DIAGRAMWIDTH#

                PIXELSPERINCH#

                CHECKBOX

                RADIOGROUP

      

Mathematical Functions