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

Do no remove, this fixes the anchor on doc.flexsim.com

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.
Do no remove, this fixes the anchor on doc.flexsim.com

AutoCAD.Object.id

readonly AutoCAD.ObjectId id

Description

The object's identifier.

Do no remove, this fixes the anchor on doc.flexsim.com

AutoCAD.Object.isReadEnabled

readonly int isReadEnabled

Description

Returns 1 if the object is currently open for reading; 0 otherwise.

Do no remove, this fixes the anchor on doc.flexsim.com

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.

Do no remove, this fixes the anchor on doc.flexsim.com

AutoCAD.Object.createExtensionDictionary()

void createExtensionDictionary( )

Description

Adds an extension dictionary to the object.

If the extension dictionary already exists, an error is recorded.
Do no remove, this fixes the anchor on doc.flexsim.com

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.

Do no remove, this fixes the anchor on doc.flexsim.com

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);
			...
		}
Do no remove, this fixes the anchor on doc.flexsim.com

AutoCAD.Object.setXData()

setXData( AutoCAD.TypedValueArray data )

Parameters

data The new values for the xData.

Description

Sets the xData associated with this object.

Do no remove, this fixes the anchor on doc.flexsim.com

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.