GetShapePath

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.