CALL calls another SmartParts object (subscript). The called subscript must be located in the SmartParts subfolder of \ETC, \STD or \PRJ\PROJECTNAME and is called only by its name without extension. During execution of the script first the folder \PRJ\PROJECTNAME is browsed for the called subscript. If it is not found there, the \STD and \ETC folders are browsed and, if found, the subscript is copied to \PRJ\PROJECTNAME folder. The name of the subscript may be a constant or a variable. You can pass values to the called subscript.
Syntax
CALL subscript_name [,parameter_list]
CALL subscript_name PARAMETERS [name1=value1 , ... namen=valuen]
CALL subscript_name PARAMETERS ALL
Parameter
subscript_name
: name of the subscript without extension. The name must not contain blanks. Subscript names can be string constants, string variables or parameters. String operations cannot be used with a subscript call as a subscript name. The subscript name must be put between quotation marks ("), unless it matches the definition of identifiers, i.e., it begins with a letter. Otherwise, the quotation marks used in the CALL statement must be the same at the beginning and at the end, and should be different from any character of the subscript name.
PARAMETERS [name1=value1 , ... namen=valuen]
: here you can list the parameters of the subscript in any order and assign values to them.
After the PARAMETERS keyword you need to list the parameter names of the called subscript in any sequence, with both an "=" sign and a value for each. You can use string type expressions here, but only give a string value to string type parameters of the called subscript. Array parameters have to be given full array values. Parameters of the called subscript that are not listed in the subscript call will be given their original default values as defined in the library part called as a subscript. For a parameter which cannot be found in the called subscript, the default value will be used. A subscript has its own environment which depends on its calling order. The current values of the MODEL, RADIUS, RESOL, RISE, PEN, STROKE, MATERIAL, FILL, STYLE, COLOR ... options and the current transformation are all valid in the subscript. You can use or modify them, but the modifications will only have an effect locally. They do not take effect on the level the subscript was called from. Giving parameters to a subscript call means an implicit value assignment on the subscript's level.
Remarks
Subscript names must not be localized.
Usable since script version 1.1 (Allplan 2012-1).
(C) ALLPLAN GmbH |
Privacy policy |