vlax-property-available-p

AutoCad AutoLISP Functions

 
vlax-property-available-p
 
 
 

Determines if an object has a specified property

(vlax-property-available-p obj prop [check-modify])

Arguments

obj

A VLA-object.

property

A symbol or string naming the property to be checked.

check-modify

If T is specified for this argument, vlax-property-available-p also checks that the property can be modified.

Return Values

T, if the object has the specified property; otherwise nil. If T is specified for the check-modify argument, vlax-property-available-p returns nil if either the property is not available or the property cannot be modified.

Examples

The following examples apply to a LightweightPolyline object:

_$ (vlax-property-available-p
WhatsMyLine 'Color)
T
_$ (vlax-property-available-p
WhatsMyLine 'center)
nil

The following examples apply to a Circle object:

_$ (vlax-property-available-p
myCircle 'area)
T

Note how supplying the optional third argument changes the result:

_$ (vlax-property-available-p
myCircle 'area T)
nil

The function returns nil because, although the circle has an “area” property, that property cannot be modified.

See Also