Library parts have a GDL window reserved for the Properties script.
This script allows you to make library part properties dependent on parameters, and, through a directive, define their place in the final
component list. By using a few commands,
it is possible to define in the script local descriptors and components.
Descriptors and components from external databases can also be referenced.
Code lengths cannot exceed 32 characters.
In the Properties script, you can use any GDL command that does not generate a shape.
DATABASE_SET
DATABASE_SET set_name [, descriptor_name, component_name, unit_name, key_name, criteria_name, list_set_name]
Database set definition or Database set selection.
If this command is placed in a MASTER_GDL script, it will define a Database set
containing Descriptor, Component, Unit, Key, Criteria and List Scheme files.
This Database set name can then be referenced from Properties Scripts
using the same command with only the set_name parameter as a directive,
by selecting the actual Database set that REF COMPONENTs and REF DESCRIPTORs refer to.
The default Database set name is “Default Set”, and will be used if no other set has been selected.
The default Database set file names are: DESCDATA, COMPDATA, COMPUNIT, LISTKEY, LISTCRIT, LISTSET.
All these names get translated in localized versions.
Scripts can include any number of DATABASE_SET selections.
set_name:
database set name.descriptor_name:
descriptor data file name.component_name:
component data file name.unit_name:
unit data file name.key_name:
key data file name.criteria_name:
criteria file name.list_set_name:
list Scheme file name.DESCRIPTOR
DESCRIPTOR name [, code, keycode]
Local descriptor definition. Scripts can include any number of DESCRIPTORs.
name:
can extend to more than one line. New lines can be defined by the character ‘n’ and tabulators by ‘t’.
Adding ” to the end of a line allows you to continue the string in the next line without adding a new line.
Inside the string, if the ” character is doubled (\), it will lose its control function and simply mean ”.
The length of the string (including the new line characters) cannot exceed 255 characters:
additional characters will be simply cut by the compiler. If you need a longer text, use several DESCRIPTORs.
code:
string, defines a code for the descriptor.keycode:
string, reference to a key in an external database.The key will be assigned to the descriptor.
REF DESCRIPTOR
REF DESCRIPTOR code [, keycode]
Reference by code and keycode string to a descriptor in an external database.
COMPONENT
COMPONENT name, quantity, unit [, proportional_with, code, keycode, unitcode]
Local component definition. Scripts can include any number of COMPONENTs.
name:
the name of the component (max. 128 characters).quantity:
a numeric expression.unit:
the string used for unit description.proportional_with:
a code between 1 and 6.
When listing, the component quantity defined above will be automatically multiplied by a value calculated for the current listed element:
1:
item,2:
length,3:
surface A,4:
surface B,5:
surface,6:
volume.code:
string, defines a code for the component.keycode:
string, reference to a key in an external database. The key will be assigned to the component.unitcode:
string, reference to a unit in an external database that controls the output format of the component quantity.
This will replace the locally defined unit string.
REF COMPONENT
REF COMPONENT code [, keycode [, numeric_expression]]
Reference by code and keycode string to a component in an external database.
The value to multiply by in the component database can be overwritten by the optional numeric expression specified here.
BINARYPROP
BINARYPROP
Binaryprop is a reference to the binary properties data (components and descriptors)
defined in the library part in the Components and Descriptors sections.
DATABASE_SET directives have no effect on the binary
data.
SURFACE3D
SURFACE3D ()
The Surface 3D () function gives you the surface of the 3D shape of the library part.
Warning: If you place two or more shapes in the same location with the same parameters,
this function will give you the total sum of all shapes’ surfaces.
VOLUME3D
VOLUME3D ()
The Volume 3D () function gives you the volume of the 3D shape of the library part.
Warning: If you place two or more shapes in the same location with the same parameters,
this function will give you the total sum of all shapes’ volumes.
POSITION
POSITION position_keyword
Effective only in the Component List.
Changes only the type of the element the following descriptors and components are associated to.
If there are no such directives in the Properties script, descriptors and components will be listed with their default element types.
position_keyword:
keywords are the following:WALLS
COLUMNS
BEAMS
DOORS
WINDOWS
OBJECTS
CEILS
PITCHED_ROOFS
LIGHTS
HATCHES
ROOMS
MESHES
A directive remains valid for all succeeding DESCRIPTORs and COMPONENTs until the next directive is ascribed.
A script can include any number of directives.
Example:
DESCRIPTOR "tPainted box.nt Properties:n tt - swinging doorsn tt - adjustable heightn tt - scratchproof" REF DESCRIPTOR "0001" s = SURFACE3D () !wardrobe surface COMPONENT "glue", 1.5, "kg" COMPONENT "handle", 2*c, "nb" !c number of doors COMPONENT "paint", 0.5*s, "kg" POSITION WALLS REF COMPONENT "0002"
DRAWING
DRAWING
DRAWING: Refers to the drawing described in the 2D script of the same library part. Use it to place drawings in your bill of materials.