Drawing Suite
377
The following example horizontally flips the shape named "Rectangle 1" on the active document.
flip shape "Rectangle 1" of active document flip command flip horizontal
Each shape is assigned a default name when it is created. For example, if you add three different
shapes to a document, they might be named "Rectangle 2," "TextBox 3," and "Oval 4." To give a
shape a more meaningful name, set the name property.
Returning a newly created shape
To add a shape object to the list of shapes for the specified document and return a shape object that
represents the newly created shape, use the make command and specify the type of shape you want
to create with the auto shape type property. The following example adds a rectangle to the active
document.
make new shape at active document with properties {auto shape type:autoshape ¬
rectangle, left position:50, top:50, width:100, height:200}
Anchoring and positioning a shape
Every shape object is anchored to a range of text. A shape is anchored to the beginning of the first
paragraph that contains the anchoring range. The shape will always remain on the same page as its
anchor.
You can view the anchor itself by selecting the shape. The shape's top and left position properties
determine its vertical and horizontal positions. The shape's relative horizontal position and relative
vertical position properties determine whether the position is measured from the anchoring
paragraph, the column that contains the anchoring paragraph, the margin, or the edge of the page.
If the lock anchor property for the shape is set to true, you cannot drag the anchor from its position
on the page.
Formatting a shape
Use the fill format property to return the
fill format
object, which contains all the properties for
formatting the fill of a closed shape. The shadow property returns the
shadow format
object, which
you use to format a shadow. Use the line format property to return the
line format
object, which
contains properties for formatting lines and arrows. The wrap format property returns the
wrap
format
object, which you use to define how text wraps around shapes. The threeD format property
returns the
threeD format
object, which you use to create 3-D shapes. You can use the
pick up
and
apply
commands to transfer formatting from one shape to another.
Use the
set shapes default properties
command for a shape object to set the formatting for the
default shape for the document. New shapes inherit many of their attributes from the default shape.
Other important shape properties
Use the shape type property to specify the type of shape: freeform, AutoShape, OLE object, callout, or
linked picture, for instance. Use the auto shape type property to specify the type of AutoShape: oval,
rectangle, or balloon, for instance.
Use the width and height properties to specify the size of the shape.
The text frame property returns the
text frame
object, which contains all the properties for attaching
text to shapes and linking the text between text frames.