mech:compdef-set-custompropertyvalue


(mech:compdef-set-custompropertyvalue  blkRefOrSolid  category  property  value)

Assigns a new value for the property name contained in PropertySet category for the blkRefOrSolid (ename) entity.

Arguments

blkRefOrSolid (ename) the entity

category (string) the Category/PropertySet containing the name property

property (string) the name of the property to be changed

value (integer/double/string/T/NIL) value to be assigned

Return

T on success, or NIL in case of an error

Example

(vl-load-mech)  1
(setq blkRefOrSolid (entlast))
<Entity name: 7e4ddcf0>
(setq res (mech:compdef-get-custompropertyvalue blkRefOrSolid "Test" "TestProp"))
("Test" "TestProp" "zzz" "zzz")
(setq res (mech:compdef-set-custompropertyvalue blkRefOrSolid "Test" "TestProp" "0000"))
T
(setq res (mech:compdef-get-custompropertyvalue blkRefOrSolid "Test" "TestProp"))
("Test" "TestProp" "0000" "0000")

Remarks

blkRefOrSolid could be a BlockReference or 3dSolid

Note

1. the Category/PropertySet category must already exist
2. if the property does not exist yet, it is automatically created inside the category PropertySet

to create and assign a new CategoryPropertySet, see function (mech:compdef-assign-propertyset)



©  Bricsys NV. All rights reserved.