Database Class

This .NET class wraps the OdDbDatabase class. The Database consists of various objects (header variables, symbol tables, table records, entities, and other objects) that represent a drawing file.
Inheritance Hierarchy
Namespace:  Teigha.DatabaseServices
Assembly:  TD_Mgd (in TD_Mgd.dll) Version: 21.4.0.0
Syntax
public sealed class Database : RXObject

The Database type exposes the following members.

Constructors
  Name Description
Public method Database
Default constructor for the Database class. Creates a new database with a default set of objects (all tables, ModelSpace and PaperSpace blocks, etc.).
Public method Database(Boolean, Boolean)
Constructor for the Database class.
Top
Properties
  Name Description
Public property AcadDatabase
Public property AllowExtendedNames
Public property Angbase
Public property Angdir
Public property AnnoAllVisible
Public property AnnotativeDwg
Public property ApproxNumObjects
Public property Attmode
Public property Aunits
Public property Auprec
Public property AutoDelete (Inherited from DisposableWrapper.)
Public property BlockTableId
Public property ByBlockLinetype
Public property ByLayerLinetype
Public property CameraDisplay
Public property CameraHeight
Public property Cannoscale
Public property Cecolor
Public property Celtscale
Public property Celtype
Public property Celweight
Public property Cetransparency
Public property Chamfera
Public property Chamferb
Public property Chamferc
Public property Chamferd
Public property Clayer
Public property Cmaterial
Public property Cmljust
Public property Cmlscale
Public property CmlstyleID
Public property ColorDictionaryId
Public property ContinuousLinetype
Public property Cshadow
Public property CurrentSpaceId
Public property CurrentViewportTableRecordId
Public property DataLinkDictionaryId
Public property DataLinkManager
Public property DetailViewStyleDictionaryId
Public property DgnFrame
Public property Dimadec
Public property Dimalt
Public property Dimaltd
Public property Dimaltf
Public property Dimaltrnd
Public property Dimalttd
Public property Dimalttz
Public property Dimaltu
Public property Dimaltz
Public property Dimapost
Public property Dimarcsym
Public property Dimaso
Public property DimAssoc
Public property Dimasz
Public property Dimatfit
Public property Dimaunit
Public property Dimazin
Public property Dimblk
Public property Dimblk1
Public property Dimblk2
Public property Dimcen
Public property Dimclrd
Public property Dimclre
Public property Dimclrt
Public property Dimdec
Public property Dimdle
Public property Dimdli
Public property Dimdsep
Public property Dimexe
Public property Dimexo
Public property Dimfrac
Public property Dimfxl
Public property DimfxlenOn
Public property Dimgap
Public property Dimjogang
Public property Dimjust
Public property Dimldrblk
Public property Dimlfac
Public property Dimlim
Public property Dimltex1
Public property Dimltex2
Public property Dimltype
Public property Dimlunit
Public property Dimlwd
Public property Dimlwe
Public property Dimpost
Public property Dimrnd
Public property Dimsah
Public property Dimscale
Public property Dimsd1
Public property Dimsd2
Public property Dimse1
Public property Dimse2
Public property Dimsoxd
Public property Dimstyle
Public property DimStyleTableId
Public property Dimtad
Public property Dimtdec
Public property Dimtfac
Public property Dimtfill
Public property Dimtfillclr
Public property Dimtih
Public property Dimtix
Public property Dimtm
Public property Dimtmove
Public property Dimtofl
Public property Dimtoh
Public property Dimtol
Public property Dimtolj
Public property Dimtp
Public property Dimtsz
Public property Dimtvp
Public property Dimtxsty
Public property Dimtxt
Public property Dimtxtdirection
Public property Dimtzin
Public property Dimupt
Public property Dimzin
Public property DispSilh
Public property dragvs
Public property DrawOrderCtl
Public property DwfFrame
Public property Elevation
Public property EndCaps
Public property Extmax
Public property Extmin
Public property Facetres
Public property FileDependencyManager
Public property Filename
Public property Filletrad
Public property Fillmode
Public property FingerprintGuid
Public property GeoDataObject
Public property GroupDictionaryId
Public property HaloGap
Public property Handseed
Public property HasRedo
Public property HasUndo
Public property HideText
Public property HpInherit
Public property HpOrigin
Public property HyperlinkBase
Public property Indexctl
Public property Insbase
Public property Insunits
Public property Interferecolor
Public property Interfereobjvs
Public property Interferevpvs
Public property IntersectColor
Public property IntersectDisplay
Public property IsDisposed (Inherited from DisposableWrapper.)
Public property IsEmr
Public property Isolines
Public property IsPartiallyOpened
Public property JoinStyle
Public property LastSavedAsMaintenanceVersion
Public property LastSavedAsVersion
Public property Latitude
Public property LayerEval
Public property LayerFilters
Public property LayerNotify
Public property LayerStateManager
Public property LayerTableId
Public property LayerZero
Public property LayoutDictionaryId
Public property LensLength
Public property LightGlyphDisplay
Public property LightingUnits
Public property LightsInBlocks
Public property Limcheck
Public property Limmax
Public property Limmin
Public property LinetypeTableId
Public property LineWeightDisplay
Public property LoftAng1
Public property LoftAng2
Public property LoftMag1
Public property LoftMag2
Public property LoftNormals
Public property LoftParam
Public property Longitude
Public property Ltscale
Public property Lunits
Public property Luprec
Public property MaintenanceReleaseVersion
Public property MaterialDictionaryId
Public property Maxactvp
Public property Measurement
Public property Menu
Public property Mirrtext
Public property MLeaderstyle
Public property MLeaderStyleDictionaryId
Public property MLStyleDictionaryId
Public property MsLtScale
Public property MsOleScale
Public property NamedObjectsDictionaryId
Public property NorthDirection
Public property NumberOfSaves
Public property ObjectContextManager
Public property ObscuredColor
Public property OleStartUp
Public property OriginalFileMaintenanceVersion
Public property OriginalFileName
Property that represents name of a file from which this database was opened (can be null pointer if database was created from a DXF file format or drawing file has a version that is earlier than R13).
Public property OriginalFileSavedByMaintenanceVersion
Public property OriginalFileSavedByVersion
Public property OriginalFileVersion
Public property Orthomode
Public property PaperSpaceVportId
Public property Pdmode
Public property Pdsize
Public property Pelevation
Public property Pextmax
Public property Pextmin
Public property Pinsbase
Public property Plimcheck
Public property Plimmax
Public property Plimmin
Public property PlineEllipse
Public property Plinegen
Public property Plinewid
Public property PlotSettingsDictionaryId
Public property PlotStyleMode
Public property PlotStyleNameDictionaryId
Public property PlotStyleNameId
Public property ProjectName
Public property Psltscale
Public property PsolHeight
Public property PsolWidth
Public property PucsBase
Public property Pucsname
Public property Pucsorg
Public property Pucsxdir
Public property Pucsydir
Public property Qtextmode
Public property RegAppTableId
Public property Regenmode
Public property RetainOriginalThumbnailBitmap
Public property Saveproxygraphics
Public property SectionManagerId
Public property SectionViewStyleDictionaryId
Public property SecurityParameters
Public property Shadedge
Public property Shadedif
Public property ShadowPlaneLocation
Public property ShowHist
Public property Sketchinc
Public property Skpoly
Public property SolidHist
Public property SortEnts
Public property Splframe
Public property Splinesegs
Public property Splinetype
Public property StepSize
Public property StepsPerSec
Public property StyleSheet
Public property SummaryInfo
Public property Surftab1
Public property Surftab2
Public property Surftype
Public property Surfu
Public property Surfv
Public property Tablestyle
Public property TableStyleDictionaryId
Public property Tdcreate
Public property Tdindwg
Public property Tducreate
Public property Tdupdate
Public property Tdusrtimer
Public property Tduupdate
Public property Textsize
Public property Textstyle
Public property TextStyleTableId
Public property Thickness
Public property ThumbnailBitmap
Public property TileMode
Public property TileModeLightSynch
Public property TimeZone
Public property Tracewid
Public property TransactionManager
Public property Treedepth
Public property TStackAlign
Public property TstackSize
Public property UcsBase
Public property Ucsname
Public property Ucsorg
Public property UcsOrthographic
Public property UcsTableId
Public property Ucsxdir
Public property Ucsydir
Public property UndoRecording
Public property Unitmode
Public property UnmanagedObject (Inherited from DisposableWrapper.)
Public property UpdateThumbnail
Public property Useri1
Public property Useri2
Public property Useri3
Public property Useri4
Public property Useri5
Public property Userr1
Public property Userr2
Public property Userr3
Public property Userr4
Public property Userr5
Public property Usrtimer
Public property VersionGuid
Public property ViewportScaleDefault
Public property ViewportTableId
Public property ViewTableId
Public property Visretain
Public property VisualStyleDictionaryId
Public property Worldview
Public property XclipFrame
Public property XrefBlockId
Public property XrefEditEnabled
Top
Methods
  Name Description
Public method AbortDeepClone
Terminates a call to DeepCloneObjects() or WblockCloneObjects().
Public method AddDBObject
Adds an object to this database object, and returns its object ID.
Public method ApplyPartialOpenFilters
Filters the model space entities of a database to only bring part of the drawing into memory. The filter applied is the intersection of entities in the view and the entities on the specified layers. Only entities both within the view and on the specified layers are brought into memory.
Public method AttachXref
Attaches the external reference file specified by fileName to the database. As a result a new external reference BlockTableRecord is created. The new block table record's name is specified in blockName. Its object ID is returned.
Public method Audit
Performs an audit operation on the header of this database object.
Public method AuditXData
Performs an audit operation for the user data. Currently not implemented.
Public method BindXrefs
Public method ClassDxfName
Retrieves the class DXF name for the specified class.
Public method Clone (Inherited from RXObject.)
Public method CloseInput
Forces all data to be loaded from the input file associated with this database object, and closes the file.
Public method CompareTo (Inherited from RXObject.)
Public method CopyFrom (Inherited from RXObject.)
Public method CountHardReferences
Retrieves a count of hard references to each of the specified object IDs.
Public methodStatic member Create
Public method CreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public method DeepCloneObjects
Deep clones a set of objects and appends the clones to the specified owner object.
Public method DetachXref
Detaches the specified external reference.
Public method DisablePartialOpen
Forbids the partial open operation and forces the entire drawing database to be loaded.
Public method DisableUndoRecording
Enables or disables recording of operations performed on this database. If disable==true, undo recording is turned off.
Public method Dispose (Inherited from DisposableWrapper.)
Public method DxfIn
Reads content of the specified .dxf file into this database.
Public method DxfOut(String, Int32, Boolean)
Writes the contents of this database object to the specified output .dxf file.
Public method DxfOut(String, Int32, DwgVersion)
Writes the contents of this database object to the specified output .dxf file.
Public method DxfOut(StreamBuf, Int32, DwgVersion, Boolean)
Writes the contents of this database object to the specified output .dxf file.
Public method Equals (Inherited from DisposableWrapper.)
Public method ForceWblockDatabaseCopy
Causes the next Database.Wblock() call on this database to copy the database. Currently not implemented.
Public methodStatic member FromAcadDatabase
Performs a conversion for the specified object of the AcadDatabase type to a database object.
Public methodStatic member GetAllDatabases
Public method GetDimensionStyleChildData
Retrieves the child dimension style data and dimension style object identifier. Currently not implemented.
Public method GetDimensionStyleChildId
Retrieves the identifier of the child dimension style. Currently not implemented.
Public method GetDimensionStyleParentId
Retrieves the identifier of the parent dimension style. Currently not implemented.
Public method GetDimRecentStyleList
Retrieves identifiers of the most recently used dimension styles (up to six). Currently not implemented.
Public method GetDimstyleData
Retrieves the database dimension variable values.
Public method GetHashCode (Inherited from DisposableWrapper.)
Public method GetHostDwgXrefGraph
Retrieves the XrefGraph object with the external reference tree of this database.
Public method GetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public method GetNearestLineWeight
Requests a lineweight and returns the nearest C++ OdDb::LineWeight enum number for this database. For example, when the passed value is 8, the returned value is kLnWt009. Currently not implemented.
Public method GetObjectId
Retrieves the object ID corresponding to the specified handle object in this database.
Public method GetRXClass (Inherited from RXObject.)
Public method GetSupportedDxfOutVersions
Retrieves an array that contains versions for the output operation.
Public method GetSupportedSaveVersions
Retrieves an array that contains versions for the save operation.
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method GetViewports
Retrieves identifiers of viewports.
Public method GetVisualStyleList
Retrieves a collection of visual style names contained in the visual style dictionary. Currently not implemented.
Public method InitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public method Insert(String, Database, Boolean)
Copies the content of a specified database to this database.
Public method Insert(Matrix3d, Database, Boolean)
Copies the content of a specified database to this database.
Public method Insert(String, String, Database, Boolean)
Copies the content of a specified database to this database.
Public methodStatic member IsObjectNonPersistent
Checks whether a specified object is not persistent.
Public method IsValidLineWeight
Checks whether a specified lineweight value matches one of the predefined lineweights.
Public method LoadLineTypeFile
Loads a linetype into this database object.
Public method LoadMlineStyleFile
Loads an MLineStyle into the specified database object.
Public methodStatic member MarkObjectNonPersistent
Marks an object as non-persistent or persistent.
Public method OverlayXref
Overlays the specified external reference file to the database. As a result a new external reference BlockTableRecord is created.
Public method Purge(ObjectIdCollection)
Removes the object IDs from the specified array that are hard referenced in this database object. After method execution, the ids array contains only object ID entities of objects that are not currently hard-referenced and thus can safely be erased.
Public method Purge(ObjectIdGraph)
Removes the nodes from the ID graph that are hard referenced in this database object.
Public method QueryX (Inherited from RXObject.)
Public method ReadDwgFile(IntPtr, Boolean, String)
Reads the contents of the drawing pointer by the drawingFile into this database object.
Public method ReadDwgFile(String, FileShare, Boolean, String)
Reads the contents of the specified file into this database object.
Public method ReadDwgFile(String, FileOpenMode, Boolean, String)
Reads the contents of the specified file name into this database object.
Public method ReadDwgFile(IntPtr, Boolean, String, AuditInfo, Boolean)
Reads the contents of the drawing pointer by the drawingFile into this database object.
Public method ReadDwgFile(String, FileShare, Boolean, String, Boolean)
Reads the contents of the specified file into this database object.
Public method ReadDwgFile(String, FileOpenMode, Boolean, String, Boolean)
Reads the contents of the specified file into this database object.
Public method ReclaimMemoryFromErasedObjects
Deletes the objects related to the passed object identifiers and performs corresponding cleaning operations. Currently not implemented.
Public method Redo
Performs a redo operation on this database object.
Public method ReloadXrefs
Reloads the external references for the specified xrefIds identifiers in the block table record.
Public method ResolveXrefs
Resolves existing external references for the current working database.
Public method RestoreForwardingXrefSymbols
This method must be used with RestoreOriginalXrefSymbols() and should be wrapped around all code with plans to edit and/or save external reference databases.
Public method RestoreOriginalXrefSymbols
Returns the database to its modified state (before any original state restoration) by redoing modifications.
Public method Save
Saves content of the currently active database. The file is saved with the original file name, type and version.
Public method SaveAs(String, DwgVersion)
Saves content of the currently active database according to the passed file name and version.
Public method SaveAs(String, SecurityParameters)
Saves content of the currently active database according to the passed file name and security parameters.
Public method SaveAs(String, DwgVersion, Boolean)
Saves content of the currently active database according to the passed file name and version.
Public method SaveAs(StreamBuf, DwgVersion, Boolean)
Saves content of the currently active database according to the passed arguments.
Public method SaveAs(String, Boolean, DwgVersion, SecurityParameters)
Saves content of the currently active database according to the passed arguments.
Public method SaveAs(String, DwgVersion, Boolean, Int32)
Saves content of the currently active database according to the passed arguments.
Public method SaveAs(String, SaveType, DwgVersion, Boolean, Int32)
Saves content of the currently active database according to the passed arguments.
Public method SaveAs(StreamBuf, SaveType, DwgVersion, Boolean, Int32)
Saves content of the currently active database according to the passed arguments.
Public method SetDimstyleData
Copies the dimension style data from the specified dimension style table record into this database object.
Public method SetTimeZoneAsUtcOffset
Sets the current time zone for this database using an offset from UTC. For example, the offset for the Brasilia Time Zone is -3.0. Currently not implemented.
Public method SetWorldPaperspaceUcsBaseOrigin
Sets the new default origin point the the new paper space for the passed view.
Public method SetWorldUcsBaseOrigin
Sets the new default origin point the the new model space for the passed view.
Public method StartUndoRecord
Starts undo recording of this database object.
Public method TimeZoneDescription
Retrieves a description of a time zone.
Public method TimeZoneOffset
Retrieves the offset in hours from the time zone passed in, from UTC. For example, the offset for Brasilia time is -3.0.
Public method ToString
Returns a string that represents the current object.
(Inherited from Object.)
Public method TryGetObjectId
Searches for an object identifier by the specified handle.
Public method Undo
Performs an undo operation on this database object.
Public method UnloadXrefs
Unloads the external references from the block table record which correspond to the passed identifiers.
Public method UpdateExt
Recalculates the extents of this database object.
Public method Wblock
Clones the entire contents of this database to a new database.
Public method Wblock(ObjectId)
Clones the specified block table record of this database to a new database.
Public method Wblock(ObjectIdCollection, Point3d)
Clones the specified block table record of this database to a new database.
Public method Wblock(Database, ObjectIdCollection, Point3d, DuplicateRecordCloning)
Public method WblockCloneObjects
Uses the deep cloning mechanism to write specified objects of this database to the new database. The objects can be taken from different source databases and must match the type of owner specified.
Public method WorldPaperspaceUcsBaseOrigin
Retrieves the default origin point of the new paper space for the passed view.
Public method WorldUcsBaseOrigin
Retrieves the default origin point of the new model space for the passed view.
Public method X (Inherited from RXObject.)
Public method XBindXrefs
Top
Events
See Also

©  Bricsys NV. All rights reserved.