CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
OdDbBlockTableRecord Class Reference

#include <DbBlockTableRecord.h>

Inheritance diagram for OdDbBlockTableRecord:
OdDbSymbolTableRecord OdDbObject OdGiDrawable OdRxObject

Public Types

enum  BlockScaling { kAny = 0 , kUniform = 1 }
 
typedef OdDbBlockTable TableType
 
typedef OdBinaryData PreviewIcon
 
- Public Types inherited from OdGiDrawable
enum  SetAttributesFlags {
  kDrawableNone = 0 , kDrawableIsAnEntity = 1 , kDrawableUsesNesting = 2 , kDrawableIsCompoundObject = 4 ,
  kDrawableViewIndependentViewportDraw = 8 , kDrawableIsInvisible = 16 , kDrawableHasAttributes = 32 , kDrawableRegenTypeDependantGeometry = 64 ,
  kDrawableIsDimension = (kDrawableIsAnEntity + kDrawableIsCompoundObject + 128) , kDrawableRegenDraw = 256 , kDrawableStandardDisplaySingleLOD = 512 , kDrawableShadedDisplaySingleLOD = 1024 ,
  kDrawableViewDependentViewportDraw = 2048 , kDrawableBlockDependentViewportDraw = 4096 , kDrawableIsExternalReference = 8192 , kDrawableNotPlottable = 16384 ,
  kDrawableNotAllowLCS = 32768 , kDrawableMergeControlOff = 65536 , kLastFlag = kDrawableMergeControlOff
}
 
enum  DrawableType {
  kGeometry = 0 , kDistantLight = 1 , kPointLight = 2 , kSpotLight = 3 ,
  kAmbientLight , kSolidBackground , kGradientBackground , kImageBackground ,
  kGroundPlaneBackground , kViewport , kWebLight , kSkyBackground ,
  kImageBasedLightingBackground
}
 

Public Member Functions

 DWGMAP_DECLARE_MEMBERS (OdDbBlockTableRecord)
 
 OdDbBlockTableRecord ()
 
OdDbObjectId appendOdDbEntity (OdDbEntity *pEntity)
 
OdDbObjectIteratorPtr newIterator (bool atBeginning=true, bool skipDeleted=true, bool sorted=false) const
 
OdString comments () const
 
void setComments (const OdString &comments)
 
OdString pathName () const
 
void setPathName (const OdString &pathName)
 
OdGePoint3d origin () const
 
void setOrigin (const OdGePoint3d &origin)
 
OdDbBlockBeginPtr openBlockBegin (OdDb::OpenMode openMode=OdDb::kForRead)
 
OdDbBlockEndPtr openBlockEnd (OdDb::OpenMode openMode=OdDb::kForRead)
 
bool hasAttributeDefinitions () const
 
bool isAnonymous () const
 
bool isFromExternalReference () const
 
bool isFromOverlayReference () const
 
void setIsFromOverlayReference (bool bIsOverlay)
 
bool isLayout () const
 
OdDbObjectId getLayoutId () const
 
void setLayoutId (const OdDbObjectId &layoutId)
 
void getBlockReferenceIds (OdDbObjectIdArray &referenceIds, bool directOnly=true, bool forceValidity=false)
 
void getErasedBlockReferenceIds (OdDbObjectIdArray &referenceIds)
 
bool isUnloaded () const
 
void setIsUnloaded (bool isUnloaded)
 
virtual bool subWorldDraw (OdGiWorldDraw *pWd) const ODRX_OVERRIDE
 
virtual OdUInt32 subSetAttributes (OdGiDrawableTraits *pTraits) const ODRX_OVERRIDE
 
virtual OdResult dwgInFields (OdDbDwgFiler *pFiler) ODRX_OVERRIDE
 
virtual void dwgOutFields (OdDbDwgFiler *pFiler) const ODRX_OVERRIDE
 
virtual OdResult dxfInFields (OdDbDxfFiler *pFiler) ODRX_OVERRIDE
 
virtual void dxfOutFields (OdDbDxfFiler *pFiler) const ODRX_OVERRIDE
 
virtual void subClose () ODRX_OVERRIDE
 
virtual OdResult subGetClassID (void *pClsid) const ODRX_OVERRIDE
 
virtual OdResult subErase (bool erasing) ODRX_OVERRIDE
 
virtual void subHandOverTo (OdDbObject *pNewObject) ODRX_OVERRIDE
 
virtual void copyFrom (const OdRxObject *p) ODRX_OVERRIDE
 
OdDbDatabasexrefDatabase (bool includeUnresolved=false) const
 
OdDb::XrefStatus xrefStatus () const
 
bool hasPreviewIcon () const
 
void getPreviewIcon (PreviewIcon &previewIcon) const
 
void setPreviewIcon (const PreviewIcon &previewIcon)
 
virtual OdDbObjectPtr subWblockClone (OdDbIdMapping &ownerIdMap, OdDbObject *, bool bPrimary) const ODRX_OVERRIDE
 
OdDbSortentsTablePtr getSortentsTable (bool createIfNotFound=true)
 
OdGiDrawabledrawable ()
 
virtual OdResult getGeomExtents (OdGeExtents3d &extents) const
 
OdResult geomExtentsBestFit (OdGeExtents3d &extents, const OdGeMatrix3d &parentXform=OdGeMatrix3d::kIdentity) const
 
virtual OdResult assumeOwnershipOf (OdDbObjectIdArray entitiesToMove)
 
BlockScaling blockScaling () const
 
void setBlockScaling (BlockScaling blockScaling)
 
void setExplodable (bool explodable)
 
bool explodable () const
 
void setBlockInsertUnits (OdDb::UnitsValue blockInsertUnits)
 
OdDb::UnitsValue blockInsertUnits () const
 
void applyPartialUndo (OdDbDwgFiler *pFiler, OdRxClass *pClass)
 
void postProcessAnnotativeBTR (int &strippedCount, bool noModify=false, bool scale=true)
 
void addAnnoScalestoBlkRefs (bool scale=false)
 
- Public Member Functions inherited from OdDbSymbolTableRecord
 ODDB_DECLARE_MEMBERS (OdDbSymbolTableRecord)
 
 OdDbSymbolTableRecord ()
 
virtual OdString getName () const
 
virtual void setName (const OdString &sName)
 
bool isDependent () const
 
bool isResolved () const
 
virtual OdResult dwgInFields (OdDbDwgFiler *pFiler)
 
virtual void dwgOutFields (OdDbDwgFiler *pFiler) const
 
void appendToOwner (OdDbIdPair &idPair, OdDbObject *pOwnerObject, OdDbIdMapping &ownerIdMap)
 
virtual OdResult dxfInFields (OdDbDxfFiler *pFiler)
 
virtual void dxfOutFields (OdDbDxfFiler *pFiler) const
 
virtual void dxfOutFields_R12 (OdDbDxfFiler *pFiler) const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdResult subErase (bool erasing)
 
virtual void subSwapIdWith (const OdDbObjectId &otherId, bool swapXdata=false, bool swapExtDict=false)
 
- Public Member Functions inherited from OdDbObject
 ODDB_DECLARE_MEMBERS (OdDbObject)
 
 ~OdDbObject ()
 
void addRef ()
 
void release ()
 
long numRefs () const
 
OdDbObjectId objectId () const
 
OdDbHandle getDbHandle () const
 
OdDbHandle handle () const
 
OdDbObjectId ownerId () const
 
virtual void setOwnerId (OdDbObjectId ownerId)
 
OdDbDatabasedatabase () const
 
void createExtensionDictionary ()
 
OdDbObjectId extensionDictionary () const
 
bool releaseExtensionDictionary ()
 
OdDbXrecordPtr createXrecord (const OdString &xrecordName, OdDb::DuplicateRecordCloning style=OdDb::kDrcIgnore)
 
void upgradeOpen ()
 
void downgradeOpen ()
 
void cancel ()
 
virtual OdResult subOpen (OdDb::OpenMode mode)
 
virtual void subClose ()
 
OdResult erase (bool eraseIt=true)
 
virtual OdResult subErase (bool erasing)
 
void handOverTo (OdDbObject *pNewObject, bool keepXData=true, bool keepExtDict=true)
 
virtual void subHandOverTo (OdDbObject *pNewObject)
 
void swapIdWith (OdDbObjectId otherId, bool swapXdata=false, bool swapExtDict=false)
 
virtual void subSwapIdWith (const OdDbObjectId &otherId, bool swapXdata=false, bool swapExtDict=false)
 
virtual void audit (OdDbAuditInfo *pAuditInfo)
 
void dwgIn (OdDbDwgFiler *pFiler)
 
void dwgOut (OdDbDwgFiler *pFiler) const
 
virtual OdResult dxfIn (OdDbDxfFiler *pFiler)
 
virtual void dxfOut (OdDbDxfFiler *pFiler) const
 
virtual OdResult dwgInFields (OdDbDwgFiler *pFiler)
 
virtual void dwgOutFields (OdDbDwgFiler *pFiler) const
 
virtual OdResult dxfInFields (OdDbDxfFiler *pFiler)
 
virtual void dxfOutFields (OdDbDxfFiler *pFiler) const
 
virtual OdResult dxfInFields_R12 (OdDbDxfFiler *pFiler)
 
virtual void dxfOutFields_R12 (OdDbDxfFiler *pFiler) const
 
virtual OdDb::DuplicateRecordCloning mergeStyle () const
 
virtual OdResBufPtr xData (const OdString &regappName=OdString::kEmpty) const
 
virtual void setXData (const OdResBuf *pRb)
 
bool isEraseStatusToggled () const
 
bool isErased () const
 
bool isReadEnabled () const
 
bool isWriteEnabled () const
 
bool isNotifyEnabled () const
 
bool isModified () const
 
bool isModifiedXData () const
 
bool isModifiedGraphics () const
 
bool isNewObject () const
 
bool isNotifying () const
 
bool isUndoing () const
 
bool isReallyClosing () const
 
bool isDBRO () const
 
void assertReadEnabled () const
 
void assertWriteEnabled (bool autoUndo=true, bool recordModified=true)
 
void assertNotifyEnabled () const
 
void disableUndoRecording (bool disable)
 
bool isUndoRecordingDisabled () const
 
OdDbDwgFilerundoFiler ()
 
virtual void applyPartialUndo (OdDbDwgFiler *pUndoFiler, OdRxClass *pClassObj)
 
void addReactor (OdDbObjectReactor *pReactor) const
 
void removeReactor (OdDbObjectReactor *pReactor) const
 
virtual void addPersistentReactor (const OdDbObjectId &objId)
 
virtual void removePersistentReactor (const OdDbObjectId &objId)
 
bool hasPersistentReactor (const OdDbObjectId &objId) const
 
OdDbObjectIdArray getPersistentReactors () const
 
OdDbObjectReactorArray getTransientReactors () const
 
virtual void recvPropagateModify (const OdDbObject *pSubObj)
 
virtual void xmitPropagateModify () const
 
ODRX_SEALED_VIRTUAL OdDbObjectPtr deepClone (OdDbIdMapping &idMap, OdDbObject *pOwner, bool bPrimary=true) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdDbObjectPtr wblockClone (OdDbIdMapping &idMap, OdDbObject *pOwner, bool bPrimary=true) const ODRX_SEALED
 
virtual void appendToOwner (OdDbIdPair &idPair, OdDbObject *pOwnerObject, OdDbIdMapping &idMap)
 
void setOdDbObjectIdsInFlux ()
 
bool isOdDbObjectIdsInFlux () const
 
virtual void copied (const OdDbObject *pObject, const OdDbObject *pNewObject)
 
virtual void erased (const OdDbObject *pObject, bool erasing=true)
 
virtual void goodbye (const OdDbObject *pObject)
 
virtual void openedForModify (const OdDbObject *pObject)
 
virtual void modified (const OdDbObject *pObject)
 
virtual void subObjModified (const OdDbObject *pObject, const OdDbObject *pSubObj)
 
virtual void modifyUndone (const OdDbObject *pObject)
 
virtual void modifiedXData (const OdDbObject *pObject)
 
virtual void unappended (const OdDbObject *pObject)
 
virtual void reappended (const OdDbObject *pObject)
 
bool isAProxy () const
 
virtual void objectClosed (const OdDbObjectId &objectId)
 
virtual void modifiedGraphics (const OdDbObject *pObject)
 
virtual void copyFrom (const OdRxObject *pSource)
 
bool hasSaveVersionOverride () const
 
void setHasSaveVersionOverride (bool hasSaveVersionOverride)
 
virtual OdDb::DwgVersion getObjectSaveVersion (const OdDbFiler *pFiler, OdDb::MaintReleaseVer *pMaintVer=0) const
 
virtual OdDbObjectPtr decomposeForSave (OdDb::DwgVersion ver, OdDbObjectId &replaceId, bool &exchangeXData)
 
virtual OdDbObjectPtr decomposeForSave (OdDb::SaveType format, OdDb::DwgVersion ver, OdDbObjectId &replaceId, bool &exchangeXData)
 
void convertForSave (OdDb::DwgVersion ver)
 
virtual void composeForLoad (OdDb::SaveType format, OdDb::DwgVersion version, OdDbAuditInfo *pAuditInfo)
 
virtual OdGiDrawabledrawable ()
 
virtual OdUInt32 subSetAttributes (OdGiDrawableTraits *pTraits) const
 
virtual bool subWorldDraw (OdGiWorldDraw *pWd) const
 
virtual void subViewportDraw (OdGiViewportDraw *pVd) const
 
virtual bool isPersistent () const
 
virtual OdDbStub * id () const
 
ODRX_SEALED_VIRTUAL OdResult getClassID (void *pClsid) const ODRX_SEALED
 
void setGsNode (OdGsCache *pNode)
 
OdGsCachegsNode () const
 
void xDataTransformBy (const OdGeMatrix3d &xfm)
 
bool hasFields () const
 
OdDbObjectId getField (const OdString &fieldName) const
 
OdDbObjectPtr getField (const OdString &fieldName, OdDb::OpenMode mode) const
 
virtual OdDbObjectId setField (const OdString &fieldName, OdDbField *pField)
 
virtual OdResult removeField (OdDbObjectId fieldId)
 
virtual OdDbObjectId removeField (const OdString &fieldName)
 
OdDbObjectId getFieldDictionary () const
 
OdDbObjectPtr getFieldDictionary (OdDb::OpenMode mode) const
 
virtual OdRxClasssaveAsClass (OdRxClass *pClass) const
 
- Public Member Functions inherited from OdGiDrawable
 ODRX_DECLARE_MEMBERS (OdGiDrawable)
 
virtual DrawableType drawableType () const
 
ODRX_SEALED_VIRTUAL OdUInt32 setAttributes (OdGiDrawableTraits *pTraits) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL bool worldDraw (OdGiWorldDraw *pWd) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL void viewportDraw (OdGiViewportDraw *pVd) const ODRX_SEALED
 
virtual bool isPersistent () const =0
 
virtual OdDbStub * id () const =0
 
virtual void setGsNode (OdGsCache *pGsNode)=0
 
virtual OdGsCachegsNode () const =0
 
ODRX_SEALED_VIRTUAL OdUInt32 viewportDrawLogicalFlags (OdGiViewportDraw *pVd) const ODRX_SEALED
 
virtual OdResult getGeomExtents (OdGeExtents3d &extents) const
 
ODRX_SEALED_VIRTUAL OdUInt32 regenSupportFlags () const ODRX_SEALED
 
- 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 void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 
- Protected Member Functions inherited from OdDbObject
 OdDbObject ()
 
virtual OdResult subGetClassID (void *pClsid) const
 
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 subSetAttributes (OdGiDrawableTraits *traits) const =0
 
virtual bool subWorldDraw (OdGiWorldDraw *wd) const =0
 
virtual void subViewportDraw (OdGiViewportDraw *vd) const =0
 
virtual OdUInt32 subViewportDrawLogicalFlags (OdGiViewportDraw *vd) const
 
virtual OdUInt32 subRegenSupportFlags () const
 
- Protected Attributes inherited from OdDbObject
OdDbObjectImplm_pImpl
 

Detailed Description

This class represents Block records in the OdDbBlockTable in an OdDbDatabase instance.

See also
<link Blocks, Overview of Blocks>

<group OdDb_Classes>

Definition at line 58 of file DbBlockTableRecord.h.

Member Typedef Documentation

◆ PreviewIcon

Definition at line 72 of file DbBlockTableRecord.h.

◆ TableType

Definition at line 71 of file DbBlockTableRecord.h.

Member Enumeration Documentation

◆ BlockScaling

This enumeration defines scaling methods for block references.

Enumerator
kAny 
kUniform 

Definition at line 512 of file DbBlockTableRecord.h.

Constructor & Destructor Documentation

◆ OdDbBlockTableRecord()

OdDbBlockTableRecord::OdDbBlockTableRecord ( )

This is the default constructor for objects of the OdDbBlockTableRecord class.

Member Function Documentation

◆ addAnnoScalestoBlkRefs()

void OdDbBlockTableRecord::addAnnoScalestoBlkRefs ( bool  scale = false)

Traverses through all block references of this block table record and adds annotation data to each of them.

Parameters
scale[in] If true, set the block references user scale values to the current annotation scale value. If false, set the block references user scale values to 1:1.

◆ appendOdDbEntity()

OdDbObjectId OdDbBlockTableRecord::appendOdDbEntity ( OdDbEntity pEntity)

Appends the specified entity to this Block.

Parameters
pEntity[in] Pointer to the entity.
Returns
Returns the Object ID of the newly appended entity.

◆ applyPartialUndo()

void OdDbBlockTableRecord::applyPartialUndo ( OdDbDwgFiler pFiler,
OdRxClass pClass 
)
virtual

Notification function called each time an Undo operation is performed. This object is using partial Undo.

Parameters
pFiler[in] A pointer to the undo filer with the partial undo information.
pClass[in] A pointer to the OdRxClass object for the class that will handle the Undo.
Remarks
An object indicates it's using the partial undo mechanism, if and only if it has set autoUndo false in all calls to assertWriteEnabled(). This member function must know which types of fields to scan, and must stop after reading what 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.

Reimplemented from OdDbObject.

◆ assumeOwnershipOf()

virtual OdResult OdDbBlockTableRecord::assumeOwnershipOf ( OdDbObjectIdArray  entitiesToMove)
virtual

This method causes the invoked block table record to assume the ownership of all the entities listed in the input entitiesToMove array, and provides an optimized way of moving entities between block table records.

Parameters
entitiesToMove[in] Array of entities Object Ids.

◆ blockInsertUnits()

OdDb::UnitsValue OdDbBlockTableRecord::blockInsertUnits ( ) const

Returns the block insertion units for this Block.

◆ blockScaling()

BlockScaling OdDbBlockTableRecord::blockScaling ( ) const

Returns the scaling characteristics of references to this Block.

Remarks
blockScaling() returns one of the following:

Value Description kAny 0 Block references can be non-uniformly scaled. kUniform 1 Block references can be scaled only uniformly.

◆ comments()

OdString OdDbBlockTableRecord::comments ( ) const

Returns the description text associated with this Block (DXF 4).

◆ copyFrom()

virtual void OdDbBlockTableRecord::copyFrom ( const OdRxObject p)
virtual

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

Parameters
p[in] Pointer to the source object.
Remarks
The source object and this object need not be of the same type. This function is meaningful only when implemented by custom classes.

Reimplemented from OdDbSymbolTableRecord.

◆ drawable()

OdGiDrawable * OdDbBlockTableRecord::drawable ( )
virtual

Returns a pointer to the OdGiDrawable for the object. If the object doesn't have an associated OdGiDrawable object, this function returns NULL.

Reimplemented from OdDbObject.

◆ dwgInFields()

virtual OdResult OdDbBlockTableRecord::dwgInFields ( OdDbDwgFiler pFiler)
virtual

Reads the .dwg file data of this object.

Parameters
pFiler[in] Filer object from which data are read.
Remarks
Returns the filer status. 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 OdDbSymbolTableRecord.

◆ DWGMAP_DECLARE_MEMBERS()

OdDbBlockTableRecord::DWGMAP_DECLARE_MEMBERS ( OdDbBlockTableRecord  )

◆ dwgOutFields()

virtual void OdDbBlockTableRecord::dwgOutFields ( OdDbDwgFiler pFiler) const
virtual

Writes the .dwg file data of this object.

Parameters
pFiler[in] Pointer to the filer to which data are written.
Remarks
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 OdDbSymbolTableRecord.

◆ dxfInFields()

virtual OdResult OdDbBlockTableRecord::dxfInFields ( OdDbDxfFiler pFiler)
virtual

Reads the DXF data of this object.

Parameters
pFiler[in] Pointer to the filer from which data are read.
Remarks
Returns the filer status. 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 OdDbSymbolTableRecord.

◆ dxfOutFields()

virtual void OdDbBlockTableRecord::dxfOutFields ( OdDbDxfFiler pFiler) const
virtual

Reads the DXF data of this object.

Parameters
pFiler[in] Pointer to the filer from which data are read.
Remarks
Returns the filer status. 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 OdDbSymbolTableRecord.

◆ explodable()

bool OdDbBlockTableRecord::explodable ( ) const

Returns true if and only if references to this Block can be exploded.

◆ geomExtentsBestFit()

OdResult OdDbBlockTableRecord::geomExtentsBestFit ( OdGeExtents3d extents,
const OdGeMatrix3d parentXform = OdGeMatrix3d::kIdentity 
) const

This method gets copies of this object, applies parentXform to it and after this calculates extents on the resulting object.

Parameters
extents[out] WCS extents of the block reference.
parentXform[in] Transformation matrix for block reference's geometry.

◆ getBlockReferenceIds()

void OdDbBlockTableRecord::getBlockReferenceIds ( OdDbObjectIdArray referenceIds,
bool  directOnly = true,
bool  forceValidity = false 
)

Returns the Object ID's of all OdDbBlockReference entities that reference this Block.

Parameters
referenceIds[out] Receives the BlockReference Object ID's.
directOnly[in] If true, returns only direct references.
forceValidity[in] If true, forces the loading of partially loaded drawings.
Remarks
If this Block is nested, references to the parent block(s) will be included if and only if directOnly is false. Older drawings do not explicitly store this information, and hence must be completely loaded.
See also
<link OdDbBlockTableRecord::getErasedBlockReferenceIds@OdDbObjectIdArray&, getErasedBlockReferenceIds() method>

◆ getErasedBlockReferenceIds()

void OdDbBlockTableRecord::getErasedBlockReferenceIds ( OdDbObjectIdArray referenceIds)

Returns the Object ID's of all erased OdDbBlockReference entities that directly reference this Block.

Parameters
referenceIds[out] Receives the BlockReference Object ID's.
See also
<link OdDbBlockTableRecord::getBlockReferenceIds@OdDbObjectIdArray&@bool@bool, getBlockReferenceIds() method>

◆ getGeomExtents()

virtual OdResult OdDbBlockTableRecord::getGeomExtents ( OdGeExtents3d extents) const
virtual

Returns the WCS geometric extents of this object.

Parameters
extents[out] Receives the extents.
Returns
Returns eOk if successful, or eInvalidExtents if not.
Remarks
The extents are the WCS corner points of a box, aligned with the WCS axes, that encloses the 3D extents of this Block.

Reimplemented from OdGiDrawable.

◆ getLayoutId()

OdDbObjectId OdDbBlockTableRecord::getLayoutId ( ) const

Returns the Object ID of the OdDbLayout associated with this Block.

◆ getPreviewIcon()

void OdDbBlockTableRecord::getPreviewIcon ( PreviewIcon previewIcon) const

Returns the preview icon associated with this Block.

Parameters
previewIcon[out] Receives the Preview icon.

◆ getSortentsTable()

OdDbSortentsTablePtr OdDbBlockTableRecord::getSortentsTable ( bool  createIfNotFound = true)

Returns the SortentsTable associated with this block.

Parameters
createIfNotFound[in] Create the SortentsTable if not found.
Remarks
The SortentsTable is opened for write.
See also
<link OdDbSortentsTable, OdDbSortentsTable class>

◆ hasAttributeDefinitions()

bool OdDbBlockTableRecord::hasAttributeDefinitions ( ) const

Returns true if and only if this Block contains Attribute definitions.

See also
<link OdDbAttributeDefinition, OdDbAttributeDefinition class>

◆ hasPreviewIcon()

bool OdDbBlockTableRecord::hasPreviewIcon ( ) const

Returns true if and only if this Block has a preview icon.

◆ isAnonymous()

bool OdDbBlockTableRecord::isAnonymous ( ) const

Returns true if and only if this Block is anonymous (DXF 70, bit 0x01).

\sa
<link Blocks, Overview of Blocks>

◆ isFromExternalReference()

bool OdDbBlockTableRecord::isFromExternalReference ( ) const

Returns true if and only if this Block is an Xref (DXF 70, bit 0x04).

◆ isFromOverlayReference()

bool OdDbBlockTableRecord::isFromOverlayReference ( ) const

Returns true if and only if this Block is an overlaid Xref (DXF 70, bit 0x08).

◆ isLayout()

bool OdDbBlockTableRecord::isLayout ( ) const

Returns true if and only if this Block represents a layout.

◆ isUnloaded()

bool OdDbBlockTableRecord::isUnloaded ( ) const

Returns true if and only if this Xref is unloaded (DXF 71).

◆ newIterator()

OdDbObjectIteratorPtr OdDbBlockTableRecord::newIterator ( bool  atBeginning = true,
bool  skipDeleted = true,
bool  sorted = false 
) const

Returns an Iterator that can be used to traverse this Block.

Parameters
atBeginning[in] True to start at the beginning, false to start at the end.
skipDeleted[in] If and only if true, deleted records are skipped.
sorted[in] If and only if true, the iterator will traverse the Block as sorted by this Block's SortentsTable.
Returns
Smart pointer to an iterator object.

◆ openBlockBegin()

OdDbBlockBeginPtr OdDbBlockTableRecord::openBlockBegin ( OdDb::OpenMode  openMode = OdDb::kForRead)

Opens and returns the OdDbBlockBegin object associated with this Block.

Parameters
openMode[in] Mode in which to open the object.
Remarks
This function allows client applications to access the OdDbBlockBegin object to store and retrieve Xdata in a manner compatible with AutoLISP applications.

◆ openBlockEnd()

OdDbBlockEndPtr OdDbBlockTableRecord::openBlockEnd ( OdDb::OpenMode  openMode = OdDb::kForRead)

Opens and returns the OdDbBlockEnd object associated with this Block.

Parameters
openMode[in] Mode in which to open the object.
Remarks
This function allows client applications to access the OdDbBlockEnd object to store and retrieve Xdata in a manner compatible with AutoLISP applications.

◆ origin()

OdGePoint3d OdDbBlockTableRecord::origin ( ) const

Returns the WCS origin of this Block (DXF 10).

◆ pathName()

OdString OdDbBlockTableRecord::pathName ( ) const

Returns the path and filename for the Xref drawing (DXF 1).

Remarks
Returns an empty string for non-Xref blocks.

◆ postProcessAnnotativeBTR()

void OdDbBlockTableRecord::postProcessAnnotativeBTR ( int &  strippedCount,
bool  noModify = false,
bool  scale = true 
)

This function is called when a block is set as annotative. All entities in the block are stripped of their annotative property. If a block has nested blocks, they are exploded to entities.

Parameters
strippedCount[out] Number of entities in the block that were stripped of their annotative property.
noModify[in] If true, no modifications to the entities in the block are made, but strippedCount value is computed. This mode can be used to check whether the block contains annotative entities.
scale[in] If true, scale the entities in the block by the current annotation scale value.

◆ setBlockInsertUnits()

void OdDbBlockTableRecord::setBlockInsertUnits ( OdDb::UnitsValue  blockInsertUnits)

Sets the block insertion units for this Block.

Parameters
blockInsertUnits[in] Block insert units.

◆ setBlockScaling()

void OdDbBlockTableRecord::setBlockScaling ( BlockScaling  blockScaling)

Sets the scaling characteristics of references to this Block.

Parameters
blockScaling[in] Block scaling.
Remarks
blockScaling can be one of the following:

Value Description kAny 0 Block references can be non-uniformly scaled. kUniform 1 Block references can be scaled only uniformly.

◆ setComments()

void OdDbBlockTableRecord::setComments ( const OdString comments)

Sets the description text associated with this Block (DXF 4).

Parameters
comments[in] Description text.

◆ setExplodable()

void OdDbBlockTableRecord::setExplodable ( bool  explodable)

Controls if references to this Block can be exploded.

Parameters
explodable[in] Explodable.

◆ setIsFromOverlayReference()

void OdDbBlockTableRecord::setIsFromOverlayReference ( bool  bIsOverlay)

Sets the BlockTableRecord's overlay flag.

Parameters
bIsOverlay[in] True to set the record to be an overlay; false to set the record to be an insert type xref.

◆ setIsUnloaded()

void OdDbBlockTableRecord::setIsUnloaded ( bool  isUnloaded)

Sets the unloaded status of this Xref (DXF 71).

Parameters
isUnloaded[in] Unloaded status.

◆ setLayoutId()

void OdDbBlockTableRecord::setLayoutId ( const OdDbObjectId layoutId)

Sets the Object ID of the OdDbLayout associated with this Block.

Parameters
layoutId[in] Layout ID.

◆ setOrigin()

void OdDbBlockTableRecord::setOrigin ( const OdGePoint3d origin)

Sets the WCS origin of this Block (DXF 10).

Parameters
origin[in] Origin point.

◆ setPathName()

void OdDbBlockTableRecord::setPathName ( const OdString pathName)

Sets the path and filename for the Xref drawing (DXF 1).

Parameters
pathName[in] Path and filename.

◆ setPreviewIcon()

void OdDbBlockTableRecord::setPreviewIcon ( const PreviewIcon previewIcon)

Sets the preview icon associated with this Block.

Parameters
previewIcon[in] Preview icon.

◆ subClose()

virtual void OdDbBlockTableRecord::subClose ( )
virtual

Called as the first operation as this object is being closed, for database-resident objects only.

Remarks
This function is notified just before the current open operation is to be closed, giving this function the ability to perform necessary operations. When overriding this function: 1) If the OdDbObject's state is incorrect, throw exception. 2) Call parent class's subClose(). 3) If other actions are required before close, do them. The default implementation of this function does nothing. This function can be overridden in custom classes.

Reimplemented from OdDbObject.

◆ subErase()

virtual OdResult OdDbBlockTableRecord::subErase ( bool  erasing)
virtual

Called as the first operation as this object is being erased or unerased.

Parameters
erasing[in] A copy of the erasing argument passed to erase().
Remarks
This function is notified just before the current object is to be erased, giving this function the ability to cancel the 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 OdDbSymbolTableRecord.

◆ subGetClassID()

virtual OdResult OdDbBlockTableRecord::subGetClassID ( void pClsid) const
virtual

Overridables.

Reimplemented from OdDbObject.

◆ subHandOverTo()

virtual void OdDbBlockTableRecord::subHandOverTo ( OdDbObject pNewObject)
virtual

Called as the first operation of the handOverTo function.

Parameters
pNewObject[in] Pointer to the object with which to replace this object in the database.
Remarks
This function allows custom classes to populate the new object. Overriding this function in a child class allows a child instance to be notified each time an object is handed over. This function is notified just before an object is to be handed over, giving this function the ability to cancel the handover. When overriding this function: 1) If the OdDbObject's state is incorrect, throw exception. 2) Call parent class's subHandover(). 3) If other actions are required before handover, do them. The default implementation of this function does nothing. This function can be overridden in custom classes.

Reimplemented from OdDbObject.

◆ subSetAttributes()

virtual OdUInt32 OdDbBlockTableRecord::subSetAttributes ( OdGiDrawableTraits pTraits) const
virtual

Sets the values of this object's subentity traits, and returns with the calling object's subentity traits.

Parameters
pTraits[in] Pointer to the OdGiDrawableTraits object to be set.
Remarks
When overriding subSetAttributes(), you must OR (|) the return value of <base class>::subSetAttributes(pTraits) with any flags you add. A derived class may not remove flags for any reason. The default implementation does nothing but returns kDrawableNone. This function can be overridden in custom classes.

Reimplemented from OdDbObject.

◆ subWblockClone()

virtual OdDbObjectPtr OdDbBlockTableRecord::subWblockClone ( OdDbIdMapping ownerIdMap,
OdDbObject ,
bool  bPrimary 
) const
virtual

This is subWblockClone, a member of class OdDbBlockTableRecord.

Reimplemented from OdDbObject.

◆ subWorldDraw()

virtual bool OdDbBlockTableRecord::subWorldDraw ( OdGiWorldDraw pWd) const
virtual

Returns true if the entity has no view-dependent graphics. In another case returns false.

Parameters
pWd[in] Pointer to the OdGiWorldDraw object.

Reimplemented from OdDbObject.

◆ xrefDatabase()

OdDbDatabase * OdDbBlockTableRecord::xrefDatabase ( bool  includeUnresolved = false) const

Returns the database that defines this Xref.

Parameters
includeUnresolved[in] Include unresolved Xrefs.

◆ xrefStatus()

OdDb::XrefStatus OdDbBlockTableRecord::xrefStatus ( ) const

Returns the Xref status of this Block.

Remarks
xrefStatus() returns one of the following:

Value Description OdDb::kXrfNotAnXref 0 Not an Xref OdDb::kXrfResolved 1 Resolved OdDb::kXrfUnloaded 2 Unloaded OdDb::kXrfUnreferenced 3 Unreferenced OdDb::kXrfFileNotFound 4 File Not Found OdDb::kXrfUnresolved 5 Unresolved


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