DatabaseReadDwgFile(IntPtr,
Boolean, String, AuditInfo, Boolean) Method
|
Reads the contents of the drawing pointer by
the drawingFile into this database object.
Namespace: Teigha.DatabaseServices
Assembly: TD_Mgd (in TD_Mgd.dll) Version:
24.2.0.0
Syntax
public void ReadDwgFile(
IntPtr drawingFile,
bool allowCPConversion,
string password,
AuditInfo auditInfo,
bool bPartialLoad
)
Public Sub ReadDwgFile (
drawingFile As IntPtr,
allowCPConversion As Boolean,
password As String,
auditInfo As AuditInfo,
bPartialLoad As Boolean
)
public:
void ReadDwgFile(
IntPtr drawingFile,
bool allowCPConversion,
String^ password,
AuditInfo^ auditInfo,
bool bPartialLoad
)
member ReadDwgFile :
drawingFile : IntPtr *
allowCPConversion : bool *
password : string *
auditInfo : AuditInfo *
bPartialLoad : bool -> unit
Parameters
- drawingFile IntPtr
- [in] Pointer to the .dwg file to read.
- allowCPConversion Boolean
- [in] Flag that specifies whether codepage conversion should
occur silently.
- password String
- [in] Password for a file.
- auditInfo AuditInfo
- [in] Handle to the object with audit information.
- bPartialLoad Boolean
- [in] Flag that specifies whether to perform partial loading of
a file.
Remarks
Pieces of the
drawing are read in only as needed. So, the drawing file is left
open until the database object is deleted. The method attempts to
open files with read access. The allowCPConversion argument specifies whether to
automatically perform a default conversion from the drawing
codepage to the system codepage if corresponding files for
conversion are not available (which might cause loss of data). If
allowCPConversion is false, you are asked if conversion should be
performed, otherwise conversion is performed silently. If password
is NULL, the user is prompted for a password if required. This
method should be used only with a newly created database created
via its constructor's buildDefaultDrawing
argument set to false. In all other cases
memory leaks and fatal errors can occur. The bPartialLoad flag is optimal for use when you load
large drawings and plan to work only with a small part of a
drawing. This option can help save resources and time dedicated to
vectorizing the file content compared to a normal loading model
where all objects are loaded. Over time, some objects may be loaded
and vectorized as needed which can cause slight freezes while
working with a drawing.
See Also