GetShapePath

Description:              This function returns the path value which defines the shape of a polygon.

Returns:                    Object

Usage:                       Script or Steady State

Format:                      GetShapePath(CodePointer)

Parameters:             CodePointer     { Code pointer }  { required }  { no default }

                                              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.

See Also:

GetModuleRefBox | GetPathBound