CFx SDK Documentation
2023 SP0
|
#include <DbScale.h>
Static Public Member Functions | |
static bool | nameExists (const OdString &, OdString *, OdDbDatabase *) |
Static Public Member Functions inherited from OdRxObject | |
static OdRxObjectPtr | cast (const OdRxObject *pointer) |
static OdRxClass * | desc () |
<group OdDb_Classes>
This class implements the scale object that stores information about an annotation scale as an element of the database container. The database stores the scale instances in the dictionary and associates the object ID with an each scale instance. The scale dictionary is accessed from the database object using the getScaleListDictionaryId() method. The root drawing dictionary, associates the "ACAD_SCALELIST" name with the scale dictionary.
<link db_scale_sample_dictionary.html, Example of Working with the Scale Dictionary Object>
OdDbAnnotationScale class
OdDbScale::OdDbScale | ( | ) |
Builds an instance of the scale object.
|
virtual |
This function appends this object to the specified owner object.
idPair | [in] ID pair to append. |
pOwnerObject | [in] Pointer to the owner object. |
ownerIdMap | [in/out] Owner's ID map. |
This function is used internally to subDeepClone() and subWblockClone().
Throws:
Cause eInvalidOwnerObject !pOwnerObject->get()
Reimplemented from OdDbObject.
|
virtual |
Notification function called each time an Undo operation is performed this object is using partial Undo.
pUndoFiler | [in] A pointer to the undo filer with the partial undo information. |
pClassObj | [in] A pointer to the OdRxClass object for the class that will handle the Undo. |
This member function must know which types of fields to scan, and must stop after reading what it it needs.
If the class type specified by pClassObj does not matches the class of this object, this member function must call the parent class's applyPartialUndo() and return whatever it returns.
If it does match the class of this object, this member function must use pUndoFiler to read the undo data, then typically use this object's set() method.
Throws:
Cause eNotThatKindOfClass pClassObj != OdDbObject::desc()
Reimplemented from OdDbObject.
double OdDbScale::drawingUnits | ( | ) | const |
Returns the number of drawing units as a positive Double value.
OdDbScale::setDrawingUnits(), OdDbScale::paperUnits(), OdDbScale::scale() methods
|
virtual |
Reads the .dwg file data of this object.
pFiler | [in] Filer object from which data are read. |
This function is called by dwgIn() to allow the object to read its data.
When overriding this function:
1) Call assertWriteEnabled(). 2) Call the parent class's dwgInFields(pFiler). 3) If it returns eOK, continue; otherwise return whatever the parent's dwgInFields(pFiler) returned. 4) Call the OdDbDwgFiler(pFiler) methods to read each of the object's data items in the order they were written. 5) Return pFiler->filerStatus().
Reimplemented from OdDbObject.
|
virtual |
Writes the .dwg file data of this object.
pFiler | [in] Pointer to the filer to which data are written. |
This function is called by dwgIn() to allow the object to write its data.
When overriding this function:
1) Call assertReadEnabled(). 2) Call the parent class's dwgOutFields(pFiler). 3) Call the OdDbDwgFiler(pFiler) methods to write each of the object's data items in the order they were written.
Reimplemented from OdDbObject.
|
virtual |
Reads the DXF data of this object.
pFiler | [in] Pointer to the filer from which data are read. |
This function is called by dxfIn() to allow the object to read its data.
When overriding this function:
1) Call assertWriteEnabled(). 2) Call the parent class's dwgInFields(pFiler). 3) If it returns eOK, continue; otherwise return whatever the parent's dxfInFields(pFiler) returned. 4) Call the OdDbDxfFiler(pFiler) methods to read each of the object's data items in the order they were written. 5) Return pFiler->filerStatus().
Reimplemented from OdDbObject.
|
virtual |
Writes the DXF data of this object.
pFiler | [in] Pointer to the filer to which data are to be written. |
This function is called by dxfOut() to allow the object to write its data.
When overriding this function:
1) Call assertReadEnabled(). 2) Call the parent class's dxfOutFields(pFiler). 4) Use pFiler to call the OdDbDxfFiler methods to write each of the object's data items in the order they were written.
Reimplemented from OdDbObject.
void OdDbScale::getXRefMangledName | ( | OdString | , |
OdString & | , | ||
OdDbDatabase * | |||
) |
DOM
For internal use only.
bool OdDbScale::isTemporaryScale | ( | ) | const |
Determines whether the scale object is temporary stored in the database and returns True if the
scale is temporary or False if the scale is fixed.
bool OdDbScale::isUnitScale | ( | ) | const |
Determines whether the scale object is selected as one-to-one (1:1) by default and returns True if the scale is selected (1:1) by default or False if the scale is not the default.
OdDbScale::setIsUnitScale() method
|
static |
DOM
For internal use only.
OdDbScale::ODDB_DECLARE_MEMBERS | ( | OdDbScale | ) |
double OdDbScale::paperUnits | ( | ) | const |
Returns the number of paper units as a positive Double value.
OdDbScale::setPaperUnits(), OdDbScale::drawingUnits(), OdDbScale::scale() methods
double OdDbScale::scale | ( | ) | const |
Returns the scale factor as a positive Double value. This factor defines the ratio in which units of model space correlate to the units of paper space and indicates how many paper units fit to one drawing unit.
class OdString OdDbScale::scaleName | ( | ) | const |
Returns the internal scale name as a String value. This name is used as a comment for the ratio of paper units to drawing units when the scale object is displayed in a list.
OdDbScale::setScaleName() method
void OdDbScale::setDrawingUnits | ( | double | vUnits | ) |
Sets the number of drawing units as a positive Double value. The initial value is 1.0 by default.
vUnits | [in] value of drawing units. |
OdDbScale::drawingUnits(), OdDbScale::setPaperUnits(), OdDbScale::scale() methods
void OdDbScale::setIsTemporaryScale | ( | bool | bStatus | ) |
Sets the scale temporary status as a Boolean value. The initial value is False by default.
bStatus | [in] True if the scale is temporary or False if the scale is fixed. |
void OdDbScale::setIsUnitScale | ( | bool | bStatus | ) |
Sets the scale default status as a Boolean value. The initial value is False by default.
bStatus | [in] True if the scale is selected (1:1) by default or False if the scale is not the default. |
OdDbScale::isUnitScale() method
void OdDbScale::setPaperUnits | ( | double | vUnits | ) |
Sets the number of paper units as a positive Double value. The initial value is 1.0 by default.
vUnits | [in] value of paper units. |
OdDbScale::paperUnits(), OdDbScale::setDrawingUnits(), OdDbScale::scale() methods
Sets the internal scale name as a String value. This name is used as a comment for the ratio of paper units to drawing units when the scale object is displayed in a list. The initial value is an empty string by default.
sName | [in] Scale name as non-empty string. |
OdDbScale::scaleName() method
|
virtual |
Called as the first operation as this object is being erased or unerased.
erasing | [in] A copy of the erasing argument passed to erase(). |
Returns eOk if and only if erase() is to continue.
When overriding this function:
1) If the OdDbObject's state is incorrect, return something other than eOk.
2) If the parent class's subErase() returns anything other than eOk, immediately return it.
3) If other actions are required before erase, do them.
4) Return eOk.
If you must make changes to this object's state, either make them after step 2, or roll them back if step 2 returns other than eOk.
The default implementation of this function does nothing but return eOk. This function can be overridden in custom classes.
Reimplemented from OdDbObject.