DwgParameters
Namespace: Digi21.DigiNG.IO.Dwg
Assembly: Digi21.DigiNG.IO.Dwg
Read and write parameters accepted by Dwg constructors. They correspond to the properties of Digi3D.AI's AutoCAD DWG files importer/exporter.
public struct DwgParameters
new DwgParameters() leaves all properties at their .NET default values (null or the first enumeration value). The "Default value" column indicates the effect of that value.
Properties
| Property | Description | Default value |
|---|---|---|
DwgVersion Version |
AutoCAD version used to write the file when Dispose is called. See DwgVersion. |
Ac_12: AutoCAD R11/R12. Always assign the version when writing the file. |
string TemplateFile |
.dwg file copied as a starting point when path does not exist. |
null: no template. |
string CellFile |
Unused: the Dwg constructor does not read this property. |
— |
DwgImportBlocksAs BlockCriteria |
Entity type to which each block reference is converted when reading the file. See DwgImportBlocksAs. | Complex. |
The Dwg constructor also sets these importer properties, which cannot be changed through DwgParameters:
| Importer property | Value |
|---|---|
| Import blocks | No |
| Import palette | Yes: when opening an existing file, the code table's palette is replaced by AutoCAD's standard 256-color palette. |
| Use drawing file colors | Yes: entities with their own color in the file retain it. |
Example
using Digi21.DigiNG.IO.Dwg;
var parámetros = new DwgParameters
{
Version = DwgVersion.Ac_2010,
BlockCriteria = DwgImportBlocksAs.Point
};
Console.WriteLine($"{parámetros.Version}, bloques como {parámetros.BlockCriteria}");
The Dwg example passes a DwgParameters to the constructor.