AutoCAD.Object
Description
A class that encapsulates a DWG database-resident object.
This class is a FlexScript wrapper for the AcDbObject class.
Properties
extensionDictionary | Return the ID of the extensionDictionary associated with this object. |
id | The object's identifier. |
isReadEnabled | Returns 1 if the object is currently open for reading; 0 otherwise. |
isWriteEnabled | Returns 1 if the object is currently open for writing and is not currently sending notifications; 0 otherwise. |
Methods
createExtensionDictionary | Adds an extension dictionary to the object. |
erase | Marks the object's 'erased' bit as true. |
is | True if the object is an instance of the defined FlexScript type. |
setXData | Sets the xData associated with this object. |
xData | Gets the xData associated with this object. |
Details
AutoCAD.Object.extensionDictionary
readonly AutoCAD.ObjectId extensionDictionary
Description
Return the ID of the extensionDictionary associated with this object.
Returns an invalid id if the extensionDictionary does not exist.AutoCAD.Object.isReadEnabled
readonly int isReadEnabled
Description
Returns 1 if the object is currently open for reading; 0 otherwise.
AutoCAD.Object.isWriteEnabled
readonly int isWriteEnabled
Description
Returns 1 if the object is currently open for writing and is not currently sending notifications; 0 otherwise.
AutoCAD.Object.createExtensionDictionary()
void createExtensionDictionary( ) |
Description
Adds an extension dictionary to the object.
If the extension dictionary already exists, an error is recorded.AutoCAD.Object.erase()
void erase( ) |
Description
Marks the object's 'erased' bit as true.
When the file is saved again, objects whose 'erased' bit is marked as true will be excluded from the file, and will thus not exist when loaded again.
AutoCAD.Object.is()
bool is( flexScriptType ) |
Parameters
flexScriptType | The type. |
Description
True if the object is an instance of the defined FlexScript type.
AutoCAD.Object obj = db.openObject(objId);
if (obj.is(AutoCAD.BlockReference)) {
AutoCAD.BlockReference ref = obj.as(AutoCAD.BlockReference);
...
}
AutoCAD.Object.setXData()
setXData( AutoCAD.TypedValueArray data ) |
Parameters
data | The new values for the xData. |
Description
Sets the xData associated with this object.
AutoCAD.Object.xData()
AutoCAD.TypedValueArray xData( string appName = 0 ) |
Parameters
appName | The optional application name. |
Returns
AutoCAD.TypedValueArray | The array of xData for this object. |
Description
Gets the xData associated with this object.
If the appliaction name is not specified, all xdata is returned, otherwise only the xdata for the specified name is returned. If there is no xData, this method returns an empty array.