CFx SDK Documentation
2023 SP0
|
#include <DbDatabase.h>
Static Public Member Functions | |
static bool | isValidLineWeight (int weight) |
static OdDb::LineWeight | getNearestLineWeight (int weight) |
Static Public Member Functions inherited from OdRxObject | |
static OdRxObjectPtr | cast (const OdRxObject *pointer) |
static OdRxClass * | desc () |
Protected Member Functions | |
OdDbDatabase () | |
Protected Member Functions inherited from OdDbObject | |
OdDbObject () | |
virtual OdDbObjectPtr | subDeepClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary) const |
virtual OdDbObjectPtr | subWblockClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary) const |
Protected Member Functions inherited from OdGiDrawable | |
OdGiDrawable () | |
virtual OdUInt32 | subViewportDrawLogicalFlags (OdGiViewportDraw *vd) const |
virtual OdUInt32 | subRegenSupportFlags () const |
Friends | |
class | OdDbDatabaseImpl |
This class represents a complete drawing file.
<group OdDb_Classes>
Definition at line 447 of file DbDatabase.h.
|
protected |
|
virtual |
Destroys a database instance.
void OdDbDatabase::abortDeepClone | ( | OdDbIdMapping & | idMap | ) |
Terminates a call to deepCloneObjects() or wblockCloneObjects().
idMap | [in/out] ID map of the function call to be terminated. |
This call is necessary only when a call to deepCloneObjects() or wblockCloneObjects() is made with deferXlation == true, and no call will be made with deferXlation == false.
|
virtual |
Aborts the current transaction associated with this database object.
OdDbObjectId OdDbDatabase::activeViewportId | ( | ) | const |
Returns the identifier of the active viewport for this database.
OdDbObjectId OdDbDatabase::addOdDbObject | ( | OdDbObject * | pObject, |
OdDbObjectId | ownerId = OdDbObjectId::kNull , |
||
OdDbHandle | handle = 0 |
||
) |
Adds an object to this database object, and returns its Object ID.
pObject | [in] Pointer to the object. |
ownerId | [in] Object ID of the owner of pObject. |
handle | [in] Handle for pObject. |
void OdDbDatabase::addReactor | ( | OdDbDatabaseReactor * | pReactor | ) | const |
Adds the specified reactor to this object's reactor list.
pReactor | [in] Pointer to the reactor object. |
|
virtual |
Declares the method incrementing the reference counter in objects derived from this class.
Implements OdRxObject.
|
virtual |
Adds a transaction reactor to this database object.
reactor | [in] Transaction reactor. |
|
virtual |
Applies a partial undo operation.
pUndoFiler | [in] Object used for perfoming input/output operations. |
pClassObj | [in] A pointer to an object for perfoming undo actions. |
Reimplemented from OdDbObject.
OdInt32 OdDbDatabase::approxNumObjects | ( | ) | const |
Returns the approximate number of objects in this database object.
This number is used to construct an OdDbObjectIdArray that can hold all the objects in the database, avoiding memory fragmentation and increasing performance.
OdDbHostAppServices* OdDbDatabase::appServices | ( | ) | const |
Returns the OdDbHostAppServices object associated with this database object.
|
virtual |
Performs an audit operation on the header of this database object.
pAuditInfo | [in] Pointer to an OdDbAuditInfo object. |
Reimplemented from OdDbObject.
void OdDbDatabase::auditDatabase | ( | OdDbAuditInfo * | pAuditInfo | ) |
Performs an audit operation on the this entire database object.
pAuditInfo | [in] Pointer to an AuditInfo object. |
OdDbAuditInfo* OdDbDatabase::auditInfo | ( | ) | const |
Returns the pointer to OdDbAuditInfo if the database is being loaded from a file in recover modem, otherwise returns Null.
void OdDbDatabase::blockUndoRecording | ( | bool | bBegin | ) |
Blocks or unblocks undo history recording.
bBegin | [in] A flag determining whether undo history recording is blocked (if true) or not (if false). |
OdDbObjectId OdDbDatabase::byBlockMaterialId | ( | ) | const |
Returns the identifier of the by-block material for this database.
OdDbObjectId OdDbDatabase::byLayerMaterialId | ( | ) | const |
Returns the identifier of the by-layer material for this database.
OdDbAnnotationScalePtr OdDbDatabase::cannoscale | ( | ) | const |
Returns the current annotation scale as a context object for this database.
Returns the class DXF name for the specified class.
pClass | [in] Pointer to the class object. |
void OdDbDatabase::clearUndo | ( | ) |
Clears undo history.
void OdDbDatabase::closeInput | ( | ) |
Forces all data to be loaded from the input file associated with this database object, and closes the file.
|
virtual |
Returns a count of hard references to each of the specified object IDs.
objectIds | [in] Array of object IDs. |
counts | [out] Receives an array of hard reference counts. |
Each element of counts will be incremented for each hard reference of the corresponding objectId. The caller must initialize the elements of count to zero or an appropriate value before calling this function.
|
virtual |
Returns the number of layouts in this database object.
|
virtual |
Creates a new layout with the specified name in this database object.
layoutName | [in] Layout name. |
pBlockTableRecId | [in] Pointer to the BlockTableRecID to receive the object ID of the new BlockTableRecord object. |
OdDbObjectId OdDbDatabase::currentLayoutId | ( | ) | const |
Returns the object ID of the active layout of this database object.
OdDbDictionaryPtr OdDbDatabase::dataLinkDictionary | ( | OdDb::OpenMode | mode | ) |
OdDbObjectId OdDbDatabase::dataLinkDictionaryId | ( | void | ) | const |
void OdDbDatabase::deepCloneObjects | ( | const OdDbObjectIdArray & | objectIds, |
OdDbObjectId | ownerId, | ||
OdDbIdMapping & | idMap, | ||
bool | deferXlation = false |
||
) |
Deep clones a set of objects and appends the clones to the specified owner object.
objectIds | [in] Array of object IDs of the objects to be cloned. |
ownerId | [in] Object ID of owner object. |
idMap | [in/out] ID map. |
deferXlation | [in] Defer translation. |
When cloning objects with different owner IDs, a separate call to this function is required for each ownerId. In this case, all but the final call to this function should be made with deferXlation == true. This defers translation until all objects have been cloned.
A deep clone is a clone of the specified objects and everything they own.
Deletes the specified layout from this database object.
layoutName | [in] Layout name. |
OdDbObjectId OdDbDatabase::detailViewStyle | ( | ) | const |
Returns the object ID of the current DetailViewStyle of this database object.
int OdDbDatabase::dimfit | ( | ) | const |
Returns the R14 DIMFIT system variable of this database object.
DIMAFIT DIMFIT 0 0 0 0 1 1 0 2 2 0 3 3 1 0 4 1 1 4 1 2 4 1 3 4 2 0 5 2 1 5 2 2 5 2 3 5
int OdDbDatabase::dimunit | ( | ) | const |
Returns the R14 DIMUNIT system variable of this database object.
DIMLUNIT DIMUNIT 0 1 1 0 2 2 0 3 3 0 4 4 0 5 5 0 6 8 1 1 1 1 2 2 1 3 3 1 4 4 1 5 5 1 6 8 2 1 1 2 2 2 2 3 3 2 4 6 2 5 7 2 6 8
All other input combinations return 2.
|
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.
void OdDbDatabase::enableGraphicsFlush | ( | bool | bEnable | ) |
Enables graphics flushing.
bEnable | [in] A flag which determines whether graphic flushing is enabled (true) or not (false). |
|
virtual |
Ends the current transaction associated with this database object.
OdFileDependencyManagerPtr OdDbDatabase::fileDependencyManager | ( | ) | const |
Returns the OdFileDependencyManager object of this database object.
|
virtual |
Returns the name of the active layout of this database object.
allowModel | [in] If and only if true, allows the ModelSpace layout name to be returned. |
|
virtual |
Returns the object ID of the specified layout in this database object.
layoutName | [in] Layout name. |
void OdDbDatabase::flushGraphics | ( | ) |
Flushes the graphics in this database.
|
virtual |
Returns the current formatter for units in this database.
|
virtual |
Returns the object ID of the BlockTableRecord associated with the active layout of this database object.
OdDbObjectId OdDbDatabase::getBlockTableId | ( | ) | const |
Returns the object ID of the BlockTable of this database object.
OdDbObjectId OdDbDatabase::getColorDictionaryId | ( | bool | createIfNotFound = true | ) | const |
Returns the object ID of the Color dictionary of this database object.
createIfNotFound | [in] Controls the creation of the object if it does not exist. |
OdDbObjectId OdDbDatabase::getDetailViewStyleDictionaryId | ( | bool | createIfNotFound = true | ) | const |
Returns the object ID of the DetailViewStyle dictionary of this database object.
createIfNotFound | [in] Determines whether to create a DetailViewStyle dictionary if it does not exist. |
bool OdDbDatabase::getDIMANNO | ( | ) | const |
Returns true if current dimension style is annotative.
OdResult OdDbDatabase::getDimstyleChildData | ( | const OdRxClass * | pDimClass, |
OdDbDimStyleTableRecord * | pRec, | ||
OdDbObjectId & | style | ||
) | const |
Returns the child dimension style data and dimension style object identifier.
pDimClass | [in] A pointer to a dimension class instance. |
pRec | [out] A pointer to an output dimension styles table record, which should contain child dimension style data after the method returns the control. |
style | [out] Identifier of the output style object. |
OdDbObjectId OdDbDatabase::getDimstyleChildId | ( | const OdRxClass * | pDimClass, |
const OdDbObjectId & | parentStyle | ||
) | const |
Returns the identifier of the child dimension style.
pDimClass | [in] A pointer to a dimension class instance. |
parentStyle | [in] A parent dimension style object identifier. |
void OdDbDatabase::getDimstyleData | ( | OdDbDimStyleTableRecord * | pDestination | ) | const |
Copies the dimension variables of this database object to the specified DimStyleTableRecord.
pDestination | [in] Pointer to the destination record. |
OdDbObjectId OdDbDatabase::getDimstyleParentId | ( | const OdDbObjectId & | childStyle | ) | const |
Returns the identifier of the parent dimension style.
childStyle | [in] A child dimension style object identifier. |
OdDbObjectId OdDbDatabase::getDimStyleStandardId | ( | ) | const |
Returns the object ID of the "Standard" dimension style object of this database object.
OdDbObjectId OdDbDatabase::getDimStyleTableId | ( | ) | const |
Returns the object ID of the DimStyleTable of this database object.
|
virtual |
Returns the name of the file associated with this database object.
OdDbObjectId OdDbDatabase::getGroupDictionaryId | ( | bool | createIfNotFound = true | ) | const |
Returns the object ID of the Group dictionary of this database object.
createIfNotFound | [in] Controls the creation of the object if it does not exist. |
OdDbObjectId OdDbDatabase::getLayerAdskId | ( | OdDb::LayerAdskType | layerType, |
bool | createIfNotFound = false |
||
) | const |
Returns the object ID of the specified system layer object of this database object.
layerType | [in] Type of system layer. |
createIfNotFound | [in] Controls the creation of the object if it does not exist. |
Value Layer name OdDb::kLayerSystemLights 0 *ADSK_SYSTEM_LIGHTS OdDb::kLayerConstraints 1 *ADSK_CONSTRAINTS
OdDbObjectId OdDbDatabase::getLayerDefpointsId | ( | bool | createIfNotFound = false | ) | const |
Returns the object ID of the "DEFPOINTS" layer object of this database object.
createIfNotFound | [in] Controls the creation of the object if it does not exist. |
OdDbLayerStateManager* OdDbDatabase::getLayerStateManager | ( | ) | const |
Returns the OdDbLayerStateManager object of this database object.
OdDbObjectId OdDbDatabase::getLayerTableId | ( | ) | const |
Returns the object ID of the LayerTable of this database object.
OdDbObjectId OdDbDatabase::getLayerZeroId | ( | ) | const |
Returns the object ID of the "0" layer object of this database object.
OdDbObjectId OdDbDatabase::getLayoutDictionaryId | ( | bool | createIfNotFound = true | ) | const |
Returns the object ID of the Layout dictionary of this database object.
createIfNotFound | [in] Controls the creation of the object if it does not exist. |
OdDbObjectId OdDbDatabase::getLinetypeByBlockId | ( | ) | const |
Returns the object ID of the "ByBlock" Linetype object of this database object.
OdDbObjectId OdDbDatabase::getLinetypeByLayerId | ( | ) | const |
Returns the object ID of the "ByLayer" Linetype object of this database object.
OdDbObjectId OdDbDatabase::getLinetypeContinuousId | ( | ) | const |
Returns the object ID of the "Continuous" Linetype object of this database object.
OdDbObjectId OdDbDatabase::getLinetypeTableId | ( | ) | const |
Returns the object ID of the LinetypeTable of this database object.
OdDbObjectId OdDbDatabase::getMaterialDictionaryId | ( | bool | createIfNotFound = true | ) | const |
Returns the object ID of the Material dictionary of this database object.
createIfNotFound | [in] Controls the creation of the object if it does not exist. |
OdDbObjectId OdDbDatabase::getMLeaderStyleDictionaryId | ( | bool | createIfNotFound = true | ) | const |
Returns the object ID of the MLeaderStyle dictionary of this database object.
createIfNotFound | [in] Controls the creation of the object if it does not exist. |
OdDbObjectId OdDbDatabase::getMLStyleDictionaryId | ( | bool | createIfNotFound = true | ) | const |
Returns the object ID of the MLineStyle dictionary of this database object.
createIfNotFound | [in] Controls the creation of the object if it does not exist. |
OdDbObjectId OdDbDatabase::getModelSpaceId | ( | ) | const |
Returns the object ID of the ModelSpace Block object of this database object.
OdDbObjectId OdDbDatabase::getNamedObjectsDictionaryId | ( | ) | const |
Returns the object ID of the NamedObjects dictionary of this database object.
|
static |
Requires a lineweight and returns the nearest OdDb::LineWeight enum number for this database. For example, when the passed value is 8, the returned value is kLnWt009.
weight | [in] The lineweight value. |
OdDbObjectId OdDbDatabase::getOdDbObjectId | ( | const OdDbHandle & | objHandle, |
bool | createIfNotFound = false , |
||
OdUInt32 | xRefId = 0 |
||
) |
Returns the object ID corresponding to the specified handle object in this database.
objHandle | [in] Database handle. |
createIfNotFound | [in] Controls the creation of the object if it does not exist. |
xRefId | [in] Not used. |
OdDbObjectId OdDbDatabase::getPaperSpaceId | ( | ) | const |
Returns the object ID of the PaperSpace Block object of this database object.
OdDbObjectId OdDbDatabase::getPlotSettingsDictionaryId | ( | bool | createIfNotFound = true | ) | const |
Returns the object ID of the PlotSettings dictionary of this database object.
createIfNotFound | [in] Controls the creation of the object if it does not exist. |
OdDbObjectId OdDbDatabase::getPlotStyleNameDictionaryId | ( | bool | createIfNotFound = true | ) | const |
Returns the object ID of the PlotStyleName dictionary of this database object.
createIfNotFound | [in] Controls the creation of the object if it does not exist. |
OdDbObjectId OdDbDatabase::getPointCloudDictionaryId | ( | ) | const |
Returns the object ID of the point cloud dictionary.
OdGePoint3d OdDbDatabase::getPUCSBASEORG | ( | OdDb::OrthographicView | viewType | ) | const |
Returns the UCS origin and orthographic view type for the current PaperSpace UCS.
viewType | [in] Orthographic view type. |
Value View type OdDb::kNonOrthoView 0 Non-orthographic with respect to the UCS OdDb::kTopView 1 Top view with respect to the UCS OdDb::kBottomView 2 Bottom view with respect to the UCS OdDb::kFrontView 3 Front view with respect to the UCS OdDb::kBackView 4 Back view with respect to the UCS OdDb::kLeftView 5 Left view with respect to the UCS OdDb::kRightView 6 Right view with respect to the UCS
OdDbObjectId OdDbDatabase::getRegAppAcadId | ( | ) | const |
Returns the object ID of the "ACAD" RegApp object of this database object.
OdDbObjectId OdDbDatabase::getRegAppTableId | ( | ) | const |
Returns the object ID of the RegAppTable of this database object.
OdDbObjectId OdDbDatabase::getScaleListDictionaryId | ( | bool | createIfNotFound = true | ) | const |
Returns the object ID of the ScaleList dictionary of this database object.
createIfNotFound | [in] Controls the creation of the object if it does not exist. |
OdDbObjectId OdDbDatabase::getSectionManager | ( | ) | const |
Returns the object ID of the section manager.
OdDbObjectId OdDbDatabase::getSectionViewStyleDictionaryId | ( | bool | createIfNotFound = true | ) | const |
Returns the object ID of the SectionViewStyle dictionary of this database object.
createIfNotFound | [in] Determines whether to create a SectionViewStyle dictionary if it does not exist. |
OdResBufPtr OdDbDatabase::getSysVar | ( | const OdString & | name | ) | const |
Returns the specified system variable of this database object.
name | [in] Name of the system variable. |
System variable names are case-insensitive strings.
OdDbObjectId OdDbDatabase::getTableStyleDictionaryId | ( | bool | createIfNotFound = true | ) | const |
Returns the object ID of the TableStyle dictionary of this database object.
createIfNotFound | [in] Controls the creation of the object if it does not exist. |
OdDbDate OdDbDatabase::getTDCREATE | ( | ) | const |
Returns the TDCREATE system variable of this database object.
OdDbDate OdDbDatabase::getTDUPDATE | ( | ) | const |
Returns the TDUPDATE system variable of this database object.
OdDbObjectId OdDbDatabase::getTextStyleStandardId | ( | ) | const |
Returns the object ID of the "Standard" text style object of this database object.
OdDbObjectId OdDbDatabase::getTextStyleTableId | ( | ) | const |
Returns the object ID of the TextStyleTable of this database object.
OdGePoint3d OdDbDatabase::getUCSBASEORG | ( | OdDb::OrthographicView | viewType | ) | const |
Returns the UCS origin and orthographic view type for the current UCS.
viewType | [in] Orthographic view type. |
Value View type OdDb::kNonOrthoView 0 Non-orthographic with respect to the UCS OdDb::kTopView 1 Top view with respect to the UCS OdDb::kBottomView 2 Bottom view with respect to the UCS OdDb::kFrontView 3 Front view with respect to the UCS OdDb::kBackView 4 Back view with respect to the UCS OdDb::kLeftView 5 Left view with respect to the UCS OdDb::kRightView 6 Right view with respect to the UCS
OdDbObjectId OdDbDatabase::getUCSTableId | ( | ) | const |
Returns the object ID of the UCSTable of this database object.
int OdDbDatabase::getUNDOMARKS | ( | ) | const |
Returns the quantity of undo markers.
OdDbObjectId OdDbDatabase::getViewportTableId | ( | ) | const |
Returns the object ID of the ViewportTable of this database object.
OdDbObjectId OdDbDatabase::getViewTableId | ( | ) | const |
Returns the object ID of the ViewTable of this database object.
OdDbObjectId OdDbDatabase::getVisualStyleDictionaryId | ( | bool | createIfNotFound = true | ) | const |
Returns the object ID of the VisualStyle dictionary of this database object.
createIfNotFound | [in] Controls the creation of the object if it does not exist. |
OdDbObjectId OdDbDatabase::globalMaterialId | ( | ) | const |
Returns the identifier of the global material for this database.
OdDbHandle OdDbDatabase::handseed | ( | ) | const |
Returns the next available handle number of this database object.
bool OdDbDatabase::hasRedo | ( | ) | const |
Returns true if redo information exists for this database object.
bool OdDbDatabase::hasUndo | ( | ) | const |
Returns true if undo information exists for this database object.
bool OdDbDatabase::hasUndoMark | ( | ) | const |
Returns whether an undo marker has been set on this database object (returns true) or not (returns false).
OdDbHistoryManager* OdDbDatabase::historyManager | ( | ) |
Returns the current history manager for this database.
void OdDbDatabase::initialize | ( | OdDb::MeasurementValue | measurement, |
bool | bVisualStyles | ||
) |
void OdDbDatabase::initialize | ( | OdDb::MeasurementValue | measurement = OdDb::kEnglish | ) |
Adds the default set of objects and settings to this database object.
Value OdDb::kEnglish 0 OdDb::kMetric 1
measurement | [in] Units of measurement. |
void OdDbDatabase::insert | ( | const OdGeMatrix3d & | xfm, |
OdDbDatabase * | pSource, | ||
bool | preserveSourceDatabase = true |
||
) |
Copies the content of a specified database to this database.
xfm | [in] Transformation matrix. |
pSource | [in] Source database. |
preserveSourceDatabase | [in] Not used. Objects from the source database are always copied, not moved. |
Unlike the wblockCloneObjects() method, insert() also copies the sortens table. While copying duplicate objects, names will be ignored; a destination object that has the same name as the source object will be rewritten by the source one.
All model space entities in pSource are copied into model space of this database object and transformed by xfm.
OdDbObjectId OdDbDatabase::insert | ( | const OdString & | destinationBlockName, |
OdDbDatabase * | pSource, | ||
bool | preserveSourceDatabase = true |
||
) |
Copies the content of a specified database to this database.
destinationBlockName | [in] Name for the new OdDbBlockTableRecord. |
pSource | [in] Source database. |
preserveSourceDatabase | [in] Not used. Objects from the source database are always copied, not moved. |
Unlike the wblockCloneObjects() method, insert() also copies the sortens table. While copying duplicate objects, names will be ignored; a destination object that has the same name as the source object will be rewritten by the source one.
A new OdDbBlockTableRecord is created and all model space entities of pSource are copied into the new block.
OdDbObjectId OdDbDatabase::insert | ( | const OdString & | sourceBlockName, |
const OdString & | destinationBlockName, | ||
OdDbDatabase * | pSource, | ||
bool | preserveSourceDatabase = true |
||
) |
Copies the content of a specified database to this database.
sourceBlockName | [in] Name of the OdDbBlockTableRecord in pSource. |
destinationBlockName | [in] Name for the new OdDbBlockTableRecord. |
pSource | [in] Source database. |
preserveSourceDatabase | [in] Not used. Objects from the source database are always copied, not moved. |
Unlike the wblockCloneObjects() method, insert() also copies the sortens table. While copying duplicate objects, names will be ignored; a destination object that has the same name as the source object will be rewritten by the source one.
All entities in the BlockTableRecord specified by sourceBlockName in pSource are copied into the new OdDbBlockTableRecord and offset by the INSBASE value. Contents of layout blocks are copied only if sourceBlockName is a layout block name.
bool OdDbDatabase::isDatabaseConverting | ( | ) | const |
Returns true if and only if this database object is being converted after loading from a file or before saving to a file.
bool OdDbDatabase::isDatabaseLoading | ( | ) | const |
Returns true if and only if this database object is being loaded from a file.
bool OdDbDatabase::isEMR | ( | ) | const |
Returns true if and only if this database object was created by an educational version of the application.
bool OdDbDatabase::isMultiThreadedMode | ( | ) | const |
If multi-threaded mode is on, the method returns true. In the other case it returns false.
bool OdDbDatabase::isPartiallyOpened | ( | ) | const |
Returns true if and only if this database object is partially opened.
bool OdDbDatabase::isUndoBlockStarted | ( | ) |
Returns whether undo history recording has been blocked (returns true) or not (returns false).
|
static |
Requires a lineweight and returns True if the specified lineweight is valid, that is, one of the predefined lineweights in this database, or False otherwise.
weight | [in] The lineweight value. |
OdDb::DwgVersion OdDbDatabase::lastSavedAsVersion | ( | OdDb::MaintReleaseVer * | pMaintReleaseVer = 0 | ) | const |
Returns the version to which this database object was last saved.
pMaintReleaseVer | [in] Pointer to the MaintReleaseVer object to receive the maintenance release version. |
void OdDbDatabase::loadLineTypeFile | ( | const OdString & | ltName, |
const OdString & | filename, | ||
OdDb::DuplicateLinetypeLoading | dlt = OdDb::kDltNotApplicable , |
||
OdDb::TextFileEncoding | encode = OdDb::kTextFileEncodingDefault |
||
) |
Loads a linetype into this database object.
ltName | [in] Name of the linetype to load. |
filename | [in] Name of the linetype file from which to load. |
encode | [in] Encoding used in linetype text file (if known). |
dlt must be one of the following:
Value Description OdDb::kDltNotApplicable 0 Not Applicable. OdDb::kDltIgnore 1 Ignore duplicate linetypes. OdDb::kDltReplace 2 Replace duplicate linetypes.
Throws: An appropriate error if not successful.
OdDbObjectId OdDbDatabase::mleaderstyle | ( | ) | const |
Returns the object ID of the current MLeaderStyle of this database object.
OdDb::MultiThreadedMode OdDbDatabase::multiThreadedMode | ( | ) | const |
Returns which multi-threaded mode the database currently uses.
bool OdDbDatabase::newRegApp | ( | const OdString & | regAppName | ) |
Adds the specified name to the APPID table of this database object.
regAppName | [in] Application name. |
|
virtual |
Returns the number of active transactions associated with this database object.
OdInt32 OdDbDatabase::numberOfSaves | ( | ) | const |
Returns the number of times this database object has been saved since it was opened.
OdDbObjectContextManagerPtr OdDbDatabase::objectContextManager | ( | ) | const |
Returns the OdDbObjectContextManager object of this database object.
OdDbDatabase::ODRX_DECLARE_MEMBERS | ( | OdDbDatabase | ) |
OdDb::DwgVersion OdDbDatabase::originalFileSavedByVersion | ( | OdDb::MaintReleaseVer * | pMaintReleaseVer = 0 | ) | const |
Returns the version of the application that created the file from which this database object was read.
pMaintReleaseVer | [in] Pointer to the MaintReleaseVer object to receive the maintenance release version. |
OdDb::SaveType OdDbDatabase::originalFileType | ( | ) | const |
Returns the filetype of the file from which this database object was read.
Value Description OdDb::kDwg 0 .dwg file. OdDb::kDxf 0 .dxf file.
OdDb::DwgVersion OdDbDatabase::originalFileVersion | ( | OdDb::MaintReleaseVer * | pMaintReleaseVer = 0 | ) | const |
Returns the version of the file from which this database object was read.
pMaintReleaseVer | [in] Pointer to the MaintReleaseVer object to receive the maintenance release version. |
|
virtual |
Removes the object IDs from the specified array that are hard referenced in this database object.
objectIds | [in/out] Array of object IDs. |
|
virtual |
Removes the object IDs from the specified array that are hard referenced in this database object.
objectIds | [in/out] Array of object IDs. |
|
inline |
Reads the contents of the specified drawing file into this database object.
filename | [in] Name of the file from which the data is to be read. |
shareMode | [in] Share mode to use when opening the specified file. |
Value Description Oda::kShareDenyReadWrite 0x10 deny read/write mode Oda::kShareDenyWrite 0x20 deny write mode Oda::kShareDenyRead 0x30 deny read mode Oda::kShareDenyNo 0x40 deny none mode
Definition at line 1005 of file DbDatabase.h.
void OdDbDatabase::readFile | ( | OdStreamBuf * | pStreamBuf, |
bool | partialLoad = false , |
||
OdDbAuditInfo * | pAuditInfo = 0 , |
||
const OdPassword & | password = OdPassword() , |
||
bool | allowCPConversion = false |
||
) |
Reads the contents of the specified StreamBuf object or file into this database object.
pStreamBuf | [in] Pointer to the StreamBuf object from which the data is to be read. |
partialLoad | [in] Controls the partial loading of .dwg files. |
pAuditInfo | [in] Pointer to an OdDbAuditInfo object. |
password | [in] Password for file. |
allowCPConversion | [in] If and only if true, allows code page conversion. |
The specified OdDbAuditInfo object controls the audit and receives the audit status.
If pAuditInfo is non-zero, a recover will be performed instead of a load.
Throws: OdError if the read is unsuccessful.
void OdDbDatabase::redo | ( | ) |
Performs a redo operation on this database object.
|
virtual |
Declares the method decrementing the reference counter in objects derived from this class.
Implements OdRxObject.
void OdDbDatabase::removeReactor | ( | OdDbDatabaseReactor * | pReactor | ) | const |
Removes the specified reactor from this object's reactor list.
pReactor | [in] Pointer to the reactor object. |
|
virtual |
Removes the specified transaction reactor from this database object.
reactor | [in] Transaction reactor. |
|
virtual |
Renames the specified layout in this database object.
oldName | [in] Old name. |
newName | [in] New name. |
void OdDbDatabase::resetTimes | ( | ) |
Resets TDCREATE, TDUPDATE, TDINDWG and TDUSRTIMER system variables to the settings of the new drawing.
void OdDbDatabase::restoreForwardingXrefSymbols | ( | ) |
Returns the database to its modified state (before any original state restoration) by redoing modifications.
void OdDbDatabase::restoreOriginalXrefSymbols | ( | ) |
Returns the database to its original state (when the xref was first read) by undoing any modifications.
bool OdDbDatabase::retainOriginalThumbnailBitmap | ( | ) | const |
Returns the state of the RetainOriginalThumbnailBitmap flag.
Saves the database contents to the specified output .dwg file. Output file has the latest supported version format. Database contents are saved as a .dwg file of the latest supported version.
filename | [in] Target file absolute path. |
saveThumbnailImage | [in] Controls the saving of a thumbnail image to the file. |
void OdDbDatabase::save | ( | OdStreamBuf * | pStreamBuf, |
bool | saveThumbnailImage = false |
||
) |
Saves the database contents to the specified output stream buffer. Database contents are saved as a .dwg file of the latest supported version.
pStreamBuf | [in] Pointer to the StreamBuf object to which the data is to be written. |
saveThumbnailImage | [in] Controls the saving of a thumbnail image to the file. |
OdDbObjectId OdDbDatabase::sectionViewStyle | ( | ) | const |
Returns the object ID of the current SectionViewStyle of this database object.
bool OdDbDatabase::securityParams | ( | OdSecurityParams & | secParams | ) | const |
Returns the security parameters of this database object.
secParams | [in] Security params. |
void OdDbDatabase::setCannoscale | ( | OdDbAnnotationScale * | val | ) |
Sets a new annotation scale as a context object for this database.
val | [in] A new value of annotation scale. |
|
virtual |
Sets the current layout of this database object.
layoutId | [in] Object ID of layout to be set as current. |
Sets the current layout of this database object.
layoutName | [in] Name of the layout to be set as current. |
void OdDbDatabase::setCurrentUCS | ( | const OdDbObjectId & | ucsId | ) |
Sets the current UCS of this database object.
ucsId | [in] Object ID of the UCS. |
void OdDbDatabase::setCurrentUCS | ( | const OdGePoint3d & | origin, |
const OdGeVector3d & | xAxis, | ||
const OdGeVector3d & | yAxis | ||
) |
Sets the current UCS of this database object.
origin | [in] The WCS origin of the UCS. |
xAxis | [in] The WCS X-axis of the UCS. |
yAxis | [in] The WCS Y-axis of the UCS. |
void OdDbDatabase::setCurrentUCS | ( | OdDb::OrthographicView | viewType | ) |
Sets the current UCS of this database object.
viewType | [in] Orthographic view type. |
Value View type OdDb::kNonOrthoView 0 Non-orthographic with respect to the UCS OdDb::kTopView 1 Top view with respect to the UCS OdDb::kBottomView 2 Bottom view with respect to the UCS OdDb::kFrontView 3 Front view with respect to the UCS OdDb::kBackView 4 Back view with respect to the UCS OdDb::kLeftView 5 Left view with respect to the UCS OdDb::kRightView 6 Right view with respect to the UCS
void OdDbDatabase::setDetailViewStyle | ( | OdDbObjectId | objectId | ) |
Sets the object ID of the current DetailViewStyle of this database object.
objectId | [in] Object ID. |
void OdDbDatabase::setDimfit | ( | int | val | ) |
Sets the R14 DIMFIT system variable of this database object.
val | [in] New value for DIMFIT. [0..5] |
void OdDbDatabase::setDimstyleData | ( | const OdDbDimStyleTableRecord * | pSource | ) |
Copies the dimension style data from the specified DimStyleTableRecord to the dimension variables of this database object.
pSource | [in] Pointer to the source record. |
void OdDbDatabase::setDimstyleData | ( | OdDbObjectId | objectId | ) |
Copies the dimension style data from the specified DimStyleTableRecord to the dimension variables of this database object.
objectId | [in] Object ID of the source record. |
void OdDbDatabase::setDimunit | ( | int | val | ) |
Sets the R14 DIMUNIT system variable of this database object.
val | [in] New value for DIMUNIT. [1..7] |
void OdDbDatabase::setMLeaderstyle | ( | OdDbObjectId | objectId | ) |
Sets the object ID of the current MLeaderStyle of this database object.
objectId | [in] Object ID. |
|
virtual |
Sets a new multi-threaded mode for the database.
[in] | A | new value of multi-threaded mode to be set. |
void OdDbDatabase::setPUCSBASEORG | ( | OdDb::OrthographicView | viewType, |
const OdGePoint3d & | origin | ||
) |
Sets the UCS origin and orthographic view type for the current PaperSpace UCS.
origin | [in] The WCS origin of the UCS. |
viewType | [in] Orthographic view type. |
Value View type OdDb::kNonOrthoView 0 Non-orthographic with respect to the UCS OdDb::kTopView 1 Top view with respect to the UCS OdDb::kBottomView 2 Bottom view with respect to the UCS OdDb::kFrontView 3 Front view with respect to the UCS OdDb::kBackView 4 Back view with respect to the UCS OdDb::kLeftView 5 Left view with respect to the UCS OdDb::kRightView 6 Right view with respect to the UCS
void OdDbDatabase::setRetainOriginalThumbnailBitmap | ( | bool | retain | ) |
Controls the state of the RetainOriginalThumbnailBitmap flag.
retain | [in] Retain if and only if true. |
void OdDbDatabase::setSectionViewStyle | ( | OdDbObjectId | objectId | ) |
Sets the object ID of the current SectionViewStyle of this database object.
objectId | [in] Object ID. |
void OdDbDatabase::setSecurityParams | ( | const OdSecurityParams & | secParams, |
bool | setDbMod = true |
||
) |
Sets the security parameters of this database object.
secParams | [in] Security params. |
setDbMod | [in] If and only if true, the DBMOD variable will be set if the security settings are modified. |
Sets the specified system variable of this database object.
name | [in] Name of the system variable. |
pValue | [in] Pointer to an OdResBuf object that contains the new value. |
void OdDbDatabase::setTablestyle | ( | OdDbObjectId | objectId | ) |
Sets the object ID of the current TableStyle of this database object.
objectId | [in] Object ID. |
Sets the thumbnail bitmap associated with this database object.
dataLength | [in] Data length of the thumbnail. |
pBMPData | [in] Pointer to the bitmap data. |
void OdDbDatabase::setUCSBASEORG | ( | OdDb::OrthographicView | viewType, |
const OdGePoint3d & | origin | ||
) |
Sets the UCS origin and orthographic view type for the current UCS.
origin | [in] The WCS origin of the UCS. |
viewType | [in] Orthographic view type. |
Value View type OdDb::kNonOrthoView 0 Non-orthographic with respect to the UCS OdDb::kTopView 1 Top view with respect to the UCS OdDb::kBottomView 2 Bottom view with respect to the UCS OdDb::kFrontView 3 Front view with respect to the UCS OdDb::kBackView 4 Back view with respect to the UCS OdDb::kLeftView 5 Left view with respect to the UCS OdDb::kRightView 6 Right view with respect to the UCS
void OdDbDatabase::setUndoMark | ( | ) |
Sets an undo marker on this database object.
|
virtual |
Starts a new transaction of this database object.
void OdDbDatabase::startUndoRecord | ( | ) |
Starts undo recording of this database object.
Returns the GUID of the database class.
Reimplemented from OdDbObject.
OdDbObjectPtr OdDbDatabase::subWblockClone | ( | OdDbIdMapping & | ownerIdMap, |
OdDbObject * | |||
) | const |
As implemented, this function does nothing but return a null SmartPointer. It will be fully implemented in a future release.
OdDbObjectId OdDbDatabase::tablestyle | ( | ) | const |
Returns the object ID of the current TableStyle of this database object.
Returns the thumbnail bitmap associated with this database object.
dataLength | [out] Receives the data length of the thumbnail. |
void OdDbDatabase::undo | ( | ) |
Performs an undo operation on this database object.
void OdDbDatabase::undoBack | ( | ) |
Performs the undo operation on this database object.
OdDbDwgFiler* OdDbDatabase::undoFiler | ( | ) |
Returns the current object used for udo file input/output operations.
Recalculates the extents of this database object.
bExact | [in] Enables a slower but more exact extents calculation algorithm. |
OdDb::DwgVersion OdDbDatabase::version | ( | OdDb::MaintReleaseVer * | pMaintReleaseVer = 0 | ) | const |
Returns the version of this database object.
pMaintReleaseVer | [in] Pointer to the MaintReleaseVer object to receive the maintenance release version. |
OdDbDatabasePtr OdDbDatabase::wblock | ( | ) |
Clones the entire contents of this database to a new database.
OdDbDatabasePtr OdDbDatabase::wblock | ( | const OdDbObjectIdArray & | outObjIds, |
const OdGePoint3d & | basePoint | ||
) |
Clones specified objects of this database to a new database.
outObjIds | [in] Array of object IDs to be cloned. |
basePoint | [in] WCS base point for the insertion. |
OdDbDatabasePtr OdDbDatabase::wblock | ( | OdDbObjectId | blockId | ) |
Clones specified objects of this database to a new database.
blockId | [in] Object ID of the BlockTableRecord to be cloned. |
void OdDbDatabase::wblockCloneObjects | ( | const OdDbObjectIdArray & | objectIds, |
OdDbObjectId | ownerId, | ||
OdDbIdMapping & | idMap, | ||
OdDb::DuplicateRecordCloning | duplicateRecordCloning, | ||
bool | deferXlation = false |
||
) |
Shallow clones a set of objects and appends the clones to the specified owner object.
objectIds | [in] Array of object IDs of the objects to be cloned. |
ownerId | [in] Object ID of the owner object. |
idMap | [in/out] ID map. |
deferXlation | [in] Defer translation. |
When cloning objects with different owner IDs, a separate call to this function is required for each ownerId. In this case, all but the final call to this function should be made with deferXlation == true. This defers translation until all objects have been cloned.
A shallow clone is a clone of the specified objects but not what they own.
duplicateRecordCloning must be one of the following:
Value Description OdDb::kDrcNotApplicable 0 Not applicable to the object. OdDb::kDrcIgnore 1 If a duplicate record exists, use the existing record in the database and ignore the clone. OdDb::kDrcReplace 2 If a duplicate record exists, replace it with the cloned record. OdDb::kDrcXrefMangleName 3 Incoming record names are mangled with <Xref>$0$<name>. OdDb::kDrcMangleName 4 Incoming record names are mangled with $0$<name>. OdDb::kDrcUnmangleName 5 Unmangle the names mangled by OdDb::kDrcMangleName, then default to OdDb::kDrcIgnore. Typically used by RefEdit when checking records into the original database.
|
inline |
Writes the contents of this database object to the specified output file.
filename | [in] Name of the file to which the data is to be written. |
fileType | [in] File type. |
fileVersion | [in] File version. |
saveThumbnailImage | [in] Controls the saving of a thumbnail image to the file. |
dxfPrecision | [in] DXF file decimal digits precision. [0 .. 16]. |
Value Description OdDb::kDwg 0 .dwg file. OdDb::kDxf 1 .dxf file. OdDb::kDxb 2 Binary .dxf file.
fileVersion must be one of the following:
? Name Value Description n OdDb::vAC09 11 Release 9 n OdDb::vAC10 13 Release 10 y OdDb::vAC12 16 Release 11-12 y OdDb::vAC13 19 Release 13 y OdDb::vAC14 21 Release 14 y OdDb::vAC15 23 2000-2002 y OdDb::vAC18 25 2004-2006 y OdDb::vAC21 27 2007-2009 y OdDb::vAC24 29 2010-2012 y OdDb::vAC27 31 2013-2016
Throws: OdError if the write is unsuccessful.
Definition at line 923 of file DbDatabase.h.
void OdDbDatabase::writeFile | ( | OdStreamBuf * | pStreamBuf, |
OdDb::SaveType | fileType, | ||
OdDb::DwgVersion | fileVersion, | ||
bool | saveThumbnailImage = false , |
||
int | dxfPrecision = 16 |
||
) |
Writes the contents of this database object to the specified StreamBuf object.
pStreamBuf | [in] Pointer to the StreamBuf object to which the data is to be written. |
fileType | [in] File type. |
fileVersion | [in] File version. |
saveThumbnailImage | [in] Controls the saving of a thumbnail image to the file. |
dxfPrecision | [in] DXF file decimal digits precision. [0 .. 16]. |
Value Description OdDb::kDwg 0 .dwg file. OdDb::kDxf 1 .dxf file. OdDb::kDxb 2 Binary .dxf file.
Parameter fileVersion must be one of the following:
? Name Value Description n OdDb::vAC09 11 Release 9 n OdDb::vAC10 13 Release 10 y OdDb::vAC12 16 Release 11-12 y OdDb::vAC13 19 Release 13 y OdDb::vAC14 21 Release 14 y OdDb::vAC15 23 2000-2002 y OdDb::vAC18 25 2004-2006 y OdDb::vAC21 27 2007-2009 y OdDb::vAC24 29 2010-2012 y OdDb::vAC27 31 2013-2016
Throws: OdError if the write is unsuccessful.
OdDbObjectId OdDbDatabase::xrefBlockId | ( | ) | const |
Returns the object ID of the OdDbBlockTableRecord that references this database object as an Xref.
|
friend |
Definition at line 2347 of file DbDatabase.h.