CFx SDK Documentation  2020SP3
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
OdDbAnnotationScale Class Reference

#include <DbAnnotationScale.h>

Inheritance diagram for OdDbAnnotationScale:
OdDbObjectContext OdRxObject OdDbAnnotationScaleView

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdDbAnnotationScale)
 
virtual OdString getName () const
 
virtual OdResult setName (const OdString &name)
 
virtual OdIntPtr uniqueIdentifier () const
 
virtual OdString collectionName () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual double getPaperUnits () const
 
virtual OdResult setPaperUnits (double dPaperUnits)
 
virtual double getDrawingUnits () const
 
virtual OdResult setDrawingUnits (double dDrawingUnits)
 
virtual OdResult getScale (double &dScale) const
 
virtual bool getIsTemporaryScale () const
 
virtual bool matchScaleId (OdIntPtr id) const
 
- Public Member Functions inherited from OdDbObjectContext
 ODRX_DECLARE_MEMBERS (OdDbObjectContext)
 
virtual ~OdDbObjectContext ()
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Protected Member Functions

 OdDbAnnotationScale (OdDbAnnotationScaleImpl *)
 

Protected Attributes

OdDbAnnotationScaleImplm_pImpl
 

Friends

class OdDbAnnotationScaleImpl
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

This class defines an annotation scale as a context object.

Remarks
The context is the current viewport scale which can determine the properties of annotations in the viewport. You can get objects of this class using the OdDbAnnotationScale context collection. An annotation scale is the ratio of paper units to drawing units, for example, 1 mm to 1 meter for a scale of 0.01.
See also
TD_Db

<group OdDb_Classes>

Definition at line 51 of file DbAnnotationScale.h.

Constructor & Destructor Documentation

◆ OdDbAnnotationScale()

OdDbAnnotationScale::OdDbAnnotationScale ( OdDbAnnotationScaleImpl )
protected

Member Function Documentation

◆ collectionName()

virtual OdString OdDbAnnotationScale::collectionName ( ) const
virtual

Returns the name of the context collection (OdDbContextCollection) in which the annotation scale is stored.

Implements OdDbObjectContext.

Reimplemented in OdDbAnnotationScaleView.

◆ copyFrom()

virtual void OdDbAnnotationScale::copyFrom ( const OdRxObject pSource)
virtual

Copies the contents of the specified annotation scale into this object when possible.

Reimplemented from OdRxObject.

◆ getDrawingUnits()

virtual double OdDbAnnotationScale::getDrawingUnits ( ) const
virtual

Returns the drawing units value of the annotation scale.

\remarks
An annotation scale is the ratio of paper units to drawing units. If
an annotation scale is 1 mm to 1 meter, the drawing units value
is 100.0.

◆ getIsTemporaryScale()

virtual bool OdDbAnnotationScale::getIsTemporaryScale ( ) const
virtual

Returns whether annotation scales are stored temporarily in the drawing.

\remarks
Temporary annotation scales are not saved with drawings. They exist
when an Xref object with its own annotation scale is attached to a drawing.
If the Xref object is detached from the drawing, its corresponding temporary
annotation scale is removed.

◆ getName()

virtual OdString OdDbAnnotationScale::getName ( ) const
virtual

Returns the name of the annotation scale object.

\remarks
Because the name of the application scale object can change, access 
the annotation scale object using its ID, which is unique and
does not change.

Implements OdDbObjectContext.

◆ getPaperUnits()

virtual double OdDbAnnotationScale::getPaperUnits ( ) const
virtual

Returns the paper units value of the annotation scale.

\remarks
An annotation scale is the ratio of paper units to drawing units. If
an annotation scale is 1 mm to 1 meter, the paper units value
is 1.0.

◆ getScale()

virtual OdResult OdDbAnnotationScale::getScale ( double &  dScale) const
virtual

Returns the annotation scale factor.

\remarks
An annotation scale is the ratio of paper units to drawing units. If
an annotation scale is 1 mm to 1 meter, the scale factor is 0.01.

◆ matchScaleId()

virtual bool OdDbAnnotationScale::matchScaleId ( OdIntPtr  id) const
virtual

Returns whether a specified ID matches the annotation scale ID.

\param id [in]  The ID to compare with the annotation scale ID.

\remarks
This function is typically used if an Xref object that has its own annotation
scale is attached to a drawing. Because the annotation scale used by the Xref
object may be the same as the annotation scale used by the source drawing,
this function is used to determine which annotation scale is being referenced.
When referencing an annotation scale that you want saved in the drawing, do not
reference the annotation scale of the Xref object since it is temporary and
will be removed if the Xref object is detached or removed from the drawing.

◆ ODRX_DECLARE_MEMBERS()

OdDbAnnotationScale::ODRX_DECLARE_MEMBERS ( OdDbAnnotationScale  )

◆ setDrawingUnits()

virtual OdResult OdDbAnnotationScale::setDrawingUnits ( double  dDrawingUnits)
virtual

Sets the drawing units value of the annotation scale.

\param dDrawingUnits [in]  The drawing units value for the annotation scale must
be greater than zero.

\remarks
An annotation scale is the ratio of paper units to drawing units. If
an annotation scale is 1 mm to 1 meter, the drawing units value
is 100.0.

◆ setName()

virtual OdResult OdDbAnnotationScale::setName ( const OdString name)
virtual

Sets the name of the annotation scale object.

\param name [in]  Name of the annotation scale object.

\remarks
Because the name of the application scale object can change, access 
the annotation scale object using its ID, which is unique and
does not change.

Implements OdDbObjectContext.

◆ setPaperUnits()

virtual OdResult OdDbAnnotationScale::setPaperUnits ( double  dPaperUnits)
virtual

Sets the paper units value of the annotation scale.

\param dPaperUnits [in]  The paper units value for the annotation scale must be greater
than zero.

\remarks
An annotation scale is the ratio of paper units to drawing units. If
an annotation scale is 1 mm to 1 meter, the paper units value
is 1.0.

◆ uniqueIdentifier()

virtual OdIntPtr OdDbAnnotationScale::uniqueIdentifier ( ) const
virtual

Returns the ID of the annotation scale.

\remarks
The ID of the annotation scale is unique and does not change.

Implements OdDbObjectContext.

Friends And Related Function Documentation

◆ OdDbAnnotationScaleImpl

friend class OdDbAnnotationScaleImpl
friend

Definition at line 181 of file DbAnnotationScale.h.

Member Data Documentation

◆ m_pImpl

OdDbAnnotationScaleImpl* OdDbAnnotationScale::m_pImpl
protected

Definition at line 180 of file DbAnnotationScale.h.


The documentation for this class was generated from the following file: