setpropertyvalue
 
 
 

Sets the property value for an entity.

(setpropertyvalue 
  ename propertyname value [or collectionName index name val]
)

Arguments

ename

Name of the entity being modified. The ename can refer to either a graphical or a non-graphical entity.

propertyname
Name of the property to be modified. For a list of all the valid property names of a given object, use dumpallproperties.
value
Value to set the property to when the object is not a collection.
collectionName
If the object is a collection object, the Collection name is passed here.
index
The collection index to be modified.
name
Name of the property in the collection to be modified.
val
Value to set the property to.

Return Values

nil is returned unless an error occurs when the property value is being updated.

Examples

The following example demonstrates how to change the radius of a circle.

Command: (command "_circle" "2,2" 2)
nil
Command: (setpropertyvalue (entlast) "radius" 3)

The following example demonstrates how to apply overrides to a linear dimension.

Command: (command "_dimlinear" "2,2" "5,4" "3,3")
nil
Command: (setq e2 (entlast))
<Entity name: 10e2e4bd0>
Command: (setpropertyvalue e2 "Dimtfill" 2)
nil
Command: (setpropertyvalue e2 "Dimtfillclr" "2")
nil
Command: (setpropertyvalue e2 "Dimclrt" "255,0,0")
nil

The following example demonstrates how to change the first vertex of the Vertices collection.

Command: (command "_pline" "0,0" "3,3" "5,2" "")
nil
Command: (setq e3 (entlast))
<Entity name: 10e2e4da0>
Command: (setpropertyvalue e3 "Vertices" 0 "EndWidth" 1.0)
nil
See Also