GetShapePath

(Engine-Level Function)

Description: Returns the path value which defines the shape of a polygon.
Returns: Object
Usage: Script or steady state.
Function Groups: Graphics
Related to: GetModuleRefBox | GetPathBound
Format: GetShapePath(CodePointer)
Parameters:  
CodePointer
Required. Any expression for the code pointer value that defines the graphic statement.

Example:

Start [
  If 1 Check;
  [
    DrawWin = CurrentWindow() { Set drawing window };
    SelObj = LastSelected(DrawWin) { Get which graphic };
    GraphicObj = GetShapePath(SelObj) { Get shape of object };
  ]
]
Check [
  If Valid(GraphicObj) EditGraphic;
  [
    UnselectGraphics(DrawWin) { Use only this object };
    SelectPath(Self(), GraphicObj) { Mark as selected };
  ]
]

The first state listed here retrieves the last selected graphic object and gets its shape in preparation for editing it. The next state then checks to make sure a valid graphic was chosen, then it releases all other chosen graphics in the window and selects the outline of the graphic as a precursor to editing it.