Change properties (coordinates and rotation) of all annotation scales assigned to an annotative object.

Change properties (coordinates and rotation) of all annotation scales assigned to an annotative object.

Anonymous
Not applicable
555 Views
1 Reply
Message 1 of 2

Change properties (coordinates and rotation) of all annotation scales assigned to an annotative object.

Anonymous
Not applicable

Is it possible to iterate through all annotation scales, which are assigned to an annotative object,
without setting each annotation scale as current? For each assigned annotation scale the properties must be updated.

 

My current procedure is very cumbersome:
- check if the AcDbEntity is annotative.
- get pointer to AcDbObjectContextManager
- get pointer to AcDbObjectContextCollection (ACDB_ANNOTATIONSCALES_COLLECTION)
- iterate through all AcDbAnnotationScale of the current DWG.
|    - check if the annotativ object has the annotation scale the iterator points to (…->hasContext(...))|

|    - if yes, set the annotation scale current (…->setCannoscale(...))
|    - update the AcDbEntity

|    - next iteration ...

0 Likes
556 Views
1 Reply
Reply (1)
Message 2 of 2

tbrammer
Advisor
Advisor

If you don't want individual "Scale-dependent Properties" you can reset Scale-dependent Properties with

   AcDbAnnotativeObjectPE::resetScaleDependentProperties(AcDbObject* pObject)

 

If you need "Scale-dependent Properties" you have to do what you described.

 

You can force the entity to be visible in all annotation scales independent from ANNOALLVISIBLE using
  AcDbAnnotativeObjectPE::setForceAnnoAllVisible(AcDbObject* pObj, bool bForce)

You can apply the same transform matrix for all annotation scales to an entity using

  AcDbEntity::TransformBy(const AcGeMatrix3d &mat)


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

0 Likes