The Simple PCI Example File

This PCI will create a rectangle after prompting the user for height, width and the rectangle origin. These values are held in the variables HEIGHT, WIDTH and @ORIGIN respectively. This example also contains inline comments that have been generated automatically during the command save.

 

%ASKBOX=Enter rectangle height=height=Enter rectangle width=width

%ASKDIG=Digitise origin for rectangle=origin

* Initialising command:- Line

%INITCOMMAND=cmdh=2,1

%CLEARMODS=[cmdh]

* Setting modifier 'Polyline'

%SETMODIFIER=[cmdh],155,1

* Setting modifier 'Colour'

%SETMODIFIER=[cmdh],1,Aquamarine|20

* Setting modifier 'Layer'

%SETMODIFIER=[cmdh],3,15

* Setting modifier 'Style'

%SETMODIFIER=[cmdh],2,Solid|0

%INITDIGINFO=gdh1

* Add Free dig to Digitised input data

%ADDFREEDIG=[gdh1],PX[X@ORIGIN]Y[Y@ORIGIN]

* Add Free dig to Digitised input data

%ADDFREEDIG=[gdh1],IX[WIDTH]

* Add Free dig to Digitised input data

%ADDFREEDIG=[gdh1],IY[HEIGHT]

* Add Free dig to Digitised input data

%ADDFREEDIG=[gdh1],IX-[WIDTH]

* Add Free dig to Digitised input data

%ADDFREEDIG=[gdh1],IY-[HEIGHT]

* Finish Digitised input

%ADDFINISHDIG=[gdh1],[#FINISH]

%EXECCOMMAND=cmdret=[cmdh],[gdh1]

%FREEDIGINFO=[gdh1]