2024 Method
Changes 0
M

Document.Import

Description:
Imports a DWG or DXF file to the document.
public bool Import(
	string file,
	DWGImportOptions options,
	View pDBView,
	out ElementId elementId
)
  • String
    file
    Full path of the file to import. File must exist and must be a valid DWG or DXF file.
  • options
    Various options applicable to the DWG or DXF format. If nulla null reference (Nothing in Visual Basic), all options will be set to their respective default values.
  • pDBView
    View used to aid placement of the imported file. If the options specify ThisViewOnly, this argument is required and the imported file will only be visible in the specified view. If the options specify center-to-center placement, this argument is required and the imported file will be placed in the center of the specified view. Otherwise, this view is used to obtain a base level to associate with the imported file. If not specified, an existing view will be chosen instead and may open a view or associate the imported file to an arbitrary level.
  • elementId
    The id of imported instance after a successful import.
Return Value bool True if successful, otherwise False.