要使用GRIP语句,必须通过每个语句GRIP格式遵守规则。
每个GRIP语句使用相同的通用格式如下所述:
Major word/parameters 主要 关键字/参数
一个主要的关键字是一个GRIP特定的功能,如LINE(直线),或LAYER(图层)。所有的对象被定义为一个主要关键字的功能。一个主要的关键字,如果后面有任何的描述性参数,必须紧跟一个斜杠(/)。Major可以最多六个字符。
Minor words are GRIP parameters which also perform a specific function. Minor words are used in the parameters fields, following a major word and a slash, to modify or specify one of several options of a function.
For example, if you want to create a LINE in GRIP, there are several different ways to define it. If you want the line to be parallel to an existing line you would use the major word LINE and the minor word PARLEL, along with several other parameters to define the line. A minor word may be a maximum of six characters long.
另外,GRIP可以以变量方式分配值(如对象,字符,数字等)
Variable=Major word/parameters
变量也可以在参数字段中:
Variable 1=Major word/Variable 2, minor word,Variable 3
作为一个例子,下面的语句将创建的其端点的坐标之间的线。所创建的线被分配给变量LN1,现在可以在其他语句中称为LN1。
LN1=LINE/0,0,0,1,1,1
LN1可以使用GRIP DELETE语句+名字的方式被删除:
DELETE/LN1