In the preceding code example, an instance of the OdDbRotatedDimension class is created and
added to the database by calling the append OdDbEntity() method of the Block Table Record (BTR).
The BTR was created earlier by calling the safeOpenObject() method of the OdDbObjectId object
(btrId), passed as an input parameter.
Next, call the post() method of the OdDbDimAssoc class, passing a dimension object ID and a
reference to the OdDbDimAssoc object ID.
Then, specify the type of rotated dimension by calling the setRotateDimType() method.
Attaching an entity to an associative dimension
To attach an entity to an associative dimension:
Create one or several snap point references.
Define the type for each created snap point reference.
Add the entity's Id as a main entity object Id for snap point references.
Set the subentity's type for the snap point references.
Set the created snap point references to the OdDbDimAssoc object.
To make associativity work, add the OdDbDimAssoc object as a reactor for the associated
entity by calling the addPersistentReactor() method of the entity. The following is sample code
for adding an associative dimension (with Id value passed with dimAssId variable) as a reactor
for a Line entity (pLine):
pLine->addPersistentReactor(dimAssId);
Associative dimensions example application
An application containing code samples for creating, associating, and using associative dimensions
is located here: {RootDir}\Drawing\Examples\OdWriteEx, where {RootDir} is the ODA installation
folder (for example, C:\ODA).