AutoCAD plugin
Overview
This plugin supports data formats used by Autodesk Inc.'s software package AutoCAD™. Up to Autocad 2010 is supported.
Supported File Types
The file types supported by this plugin are described in the table below.
| FILE TYPE | EXTENSION | DATA TYPE |
| Autocad Drawing File | ".dwg" | String and 3D Object data |
| Drawing Interchange Format File | ".dxf" | String and 3D Object data |
Method
The following paragraphs describe the method used for reading and saving files using the Autocad plugin.
Reading
This plugin supports data formats developed and used by Autodesk Inc.'s software package Autocad. Only model space entities are processed from an Autocad file, while all page space entities are ignored.
String Data
The following Autocad entity types are supported as String data by the Autocad plugin:
- LINE
Created as a string with a segment containing two points. - LINE 3D
Created as a string with a segment containing two points. - MULTI-LINE
Created as a string with a segment containing multiple points. - CIRCLE
Created as a string with a segment containing multiple points that represent the circle. - ELLIPSE
Created as a string with a segment containing multiple points that represent the ellipse. - ARC
Created as a string with a segment containing multiple points that represent the arc. - POLYLINE
Created as a string with a segment containing multiple points. - POINT
Created as a string with a segment containing a single point. - TEXT
Created as a string with a segment containing single point with a text style applied. - ATTRIBUTE
Created as a string with a segment containing a single point with a text style applied. - TRACE
Created as a string with a segment containing four points with a fill style applied. - LEADER
Created as a string with a segment containing multiple points that represent the leader. - MTEXT
Created as a string with a segment containing a single point with a text style applied. - PROXY
Created as a string with a segment containing multiple points. - DIMENSION
Created as a string with a segment containing multiple points that represent the dimension.
String IDs are allocated based on the order in which entities appear in the Autocad file. All other entity types are not yet supported.
3D Object Data
The following Autocad entity types are supported as 3D Object data by the Autocad plugins :
- FACE 3D
Created as a triobject with a trisolation containing two co-planar triangles. The two triangles together represent the FACE 3D plane. Before creating the two triangles the plugin tests to ensure that the FACE 3D plane does not already approximate a single triangle. - SOLID
Created as a triobject with a trisolation containing two co-planar triangles. The two triangles together represent the SOLID plane. Before creating the two triangles the plugin tests to ensure that the SOLID plane does not already approximate a single triangle.
Saving
When saving entities to an Autocad file all entities are placed in model space. Page space is not used when writing files with the Autocad plugin.
String Data
The following Autocad entity types are constructed from String data when saving a file using the Autocad plugin:
- ARC
If a segment of a string approximates an arc then the plugin will write it out as an ARC entity. - CIRCLE
If a segment of a string approximates a circle then the plugin will write it out as a CIRCLE entity. - LINE
If a segment of a string has only two points then the plugin will write it out as a LINE entity. - POINT
If a segment of string has only one point and no text style applied then the plugin will write it out as a POINT entity. - POLYLINE
If a segment of a string has multiple points and does not fit any other entity type then the plugin will write it out as a POLYLINE entity. - TEXT
If a string has a text style applied, then the plugin will write out every point it contains as a TEXT entity.
Note:- If a string has multiple points and a text style applied then an entity will be created corresponding to the string data as well as a text entity for each label.
- To write text to an Autocad file, specify a Drawing Method on the Set Drawing Styles form.
- Labels of the form "attribute name/frequency/size" are not supported.
- In the case of multiple labels such as "xv,y^", only the first specified label will be saved.
3D Object Data
All 3D Object data is saved as FACE 3D entities in an Autocad file. A FACE 3D entity represents a plane and therefore each triangle needs to be represented in a similar fashion. In order to achieve this an extra point is added to each triangle that is equal to one of its vertices (such that two vertices of the plane would overlap). This then forms a plane which defines the boundaries of a triangle.
Configuration
The Autocad plugin requires the user to identify the version of Autocad they are using to ensure that compatible file versions will be created. To select a version of Autocad the user must open the Customise--Default Preferences form. Under the Files tab there is a combo box that allows the user to select the appropriate version of Autocad. Autocad 2000 is selected by default.
The Autocad plugin has an associated default styles file named "autocad.ssi/mst", which resides in SSI_STYLES. This file can be reconfigured using Surpac's style editing tools.
Messages
The messages output by the Autocad plugin are listed below:
- "Autocad: File read error"
Displayed when a general file read error occurs. - "Autocad: Critical error .... terminating."
Displayed when a critical error occurs that requires the process or program to terminate. - "Autocad: Error opening file {filename}."
Displayed when an error was found inside the given file. - "An internal error occurred when writing Autocad file"
Displayed when an internal problem occurs in Autocad plugin. - "An error occurred when writing an Autocad {entity name} entity"
Displayed when writing a particular entity type. - "An error occurred when trying to write Autocad file {filename}"
Displayed if the file could not be opened for writing. - "Autocad: Unexpected {entity type} entity."
Displayed if an entity was extracted that was not expected. - "Autocad: Ignored entity: {entity type}."
Displayed if an entity is not supported and ignored.
Limitations
No known limitations.