General Notes on Script Writing

  • GDL is not case sensitive. A variable can read accessory_object in the parameters and ACCESSORY_OBJECT in the 3d script. I match cases between them for clarity. I also use ALL CAPS for script commands, such as IF/THEN, GOSUB or MULZ, and lower case for parameter variables, such as ShadeControl.

  • 0 and 1 are controls in a script which can tell an element to be off or on for boolean operations

  • With very few exceptions, special characters are not allowed

  • ! before a line denotes the line is not applied to the script. This is useful for headings, scripting notes, organizational lines or script dividers

  • When copying a new 2d script in, review the parameter values in the script & coordinate them with the parameter names available. Default values are typically seen as penAttribute_1,2,3…, fillAttribute_1,2,3…, lineTypeAttribute_1,2,3…, etc. Where a fill is used in a saved object’s 2d script look for a line similar to the 3rd line in FIG. G.

FIG. G Sample 2d Script from a Saved Plan Symbol

  • poly2 describes the fill, the addition of _b{5} provide additional options for fill direction, scale, edges can be omitted etc. A simple poly2 is sufficient if scripting from scratch or rewriting portions of the script.

  • The important elements to coordinate are the penAttribute_n from this line. The first of the attribute is the foreground pen for the fill, the second is the background fill.

  • If you save out the primary object (assuming you are combining scripts), clearly denote which pens are used for what function, then coordinating the correct penAttribute into a pasted script is simple to replace the number in the penAttribute_n