bim:pset-create-property


(bim:pset-create-property  psetName  propName  propLabel/NIL  propDesc/NIL  visible/NIL  [dataType])

This functions create a new Property propName inside the PropertySet psetName with optional label, description and visibility state;
an optional preset data type for the property can be specified.

Arguments

psetName  (string) the name of the PropertySet where to create the property;
if 'psetName' PropertySet does not exist yet, it will be created with default parameters

propName  (string) the name of the Property to be created

propLabel  (string or NIL) the GUI label for the Property; if specified as empty string or NIL, the propName will be used automatically

propDesc  (string or NIL) the description for the Property; if not provided (specified as NIL), then the description remains an empty string

visible  (T or NIL)  specifies whether the Property propName will be visible (T) or hidden (NIL)

dataType  (optional, integer or NIL)  specifies the data type for the new property;

supported data types are : bool, integer, double, string (use bcBimTypeBool or bcBimTypeInteger or bcBimTypeDouble or bcBimTypeString), see Property DataType Constants

Return

T or NIL, indicating success or failure

Example

(vl-load-bim)
(bim:create-propertyset "MyPerInstance-1" "MyPSet-1" T T)
(bim:pset-create-property "MyPSet-1" "Prop-1" "PropLabel-1" "PropDesc-1" T)

Remarks

the "visible" status means whether the Property is visible in PropertiesPanel;
the psetName argument can refer to the PropertySet 'name' or PropertySet 'label', both is supported

Note

if dataType is omitted or NIL, the new property will be created with undefined property data  type (shown as "[Extended type]" in BimProperties dialog);
the effective property data type is then defined with the first assignment of a value by (bim:pset-set-property)



©  Bricsys NV. All rights reserved.