Digital maps building as well as GIS data preparation processes require defining graphic elements as objects (classification) and describing the objects’ characteristics. In other words, object class definitions and corresponding characteristics data fields are to be added to the graphic elements.
Basic AutoCAD does not provide built-in tools for the solution of this task. There are two such tools for dwg-files in AutoCAD Map 3D – Feature classes (Object classes) and Object Data. Unfortunately, both of these tools are implemented with a number of drawbacks that have prevented AutoCAD Map 3D to become a comfortable and popular tool for digital maps building to date. There are also third-party plugins for AutoCAD Map 3D that allow defining objects and their characteristics. However, these applications are not comprehensive, i.e. they are not suitable for the creation of plans and maps of all relevant scales with desired contents, resources and data layout requirements.
Thus, insufficiency and nonuniversality of all of these applications has led to the fact that instead of using AutoCAD Map 3D, users have to create digital plans, maps and GIS data in a completely different software or use AutoCAD Map 3D mainly as CAD adding object definitions and characteristics descriptions with third-party applications.
AutoCAD Map 3D Feature classes (Object classes) is a powerful and quite convenient tool for drawing with simultaneous graphic elements definition as objects and custom properties creation for the characteristics input. Object Data linked to the specific Feature classes can be used as the data fields instead of its custom properties.
However, Feature classes have a number of drawbacks, the most fundamental of which – when objects are overridden or detached the corresponding Object Data or Custom properties data fields are not detached, and one graphic element can be defined only as one object. The former leads to graphic elements data fields accumulation causing problems with dwg-files. The latter does not allow maintaining topologically correct chain-node data structure in the definitions using Feature classes. Other Feature classes drawbacks are not so significant, but all of them could not be fixed due to the closed source code.
Nevertheless, the successful solutions found in Feature classes deserve consideration and application, while the ideas behind Feature classes have much greater potential and can be implemented much broader and effectively.
On the other hand, the means of describing the extended data in AutoCAD, AutoCAD Map 3D – XData, XRecord and Object Data (OD) – can also be used without Feature classes both to define graphic elements as objects and describe their characteristics. In addition, Object Data in AutoCAD Map 3D is provided with a minimum set of user commands (unlike XData and XRecord) and the usage of OD is built in nearly every function of AutoCAD Map 3D.
Overview of ODCLASS plugin for AutoCAD Map 3D
ODCLASS was created to develop the capabilities of Feature classes (Object classes) and Object Data taking into account its advantages and disadvantages, solving same tasks as Feature classes but solely on the basis of Object Data.
The development of ODCLASS was launched after massive eight-year experience of Feature classes and Object Data usage, after the analysis of other relevant applications possibilities.
ODCLASS – plugin for AutoCAD Map 3D 2010-2016, allowing drawing with simultaneous graphic elements classification and their characteristics data fields creation. Moreover, the data fields are provided with acceptable values and it is possible in ODCLASS to enter and control the characteristics values using these ranges. ODCLASS allows searching in dwg-files by object definitions, manually and automatically defining drawn graphic elements as objects, manually and automatically assigning dwg-files elements with necessary graphic properties. ODCLASS contains the complex of checks allowing accuracy and integrity control of object definitions and their characteristics set.
ODCLASS solves three main tasks:
- speed up drawing;
- provide conformance with any given drawing standard;
- provide the creation of an internal database in dwg-files with graphic elements definition as objects and the description of the objects’ characteristics.
Object definition (drawing standard) files in ODCLASS
ODCLASS as well as Feature classes (Object classes) uses an external text file with the definition of objects, classification, characteristics and acceptable ranges. Object definitions contain the lists of possible graphic properties of graphic elements for each object.
One such object definition text file is the description of a drawing standard. With these files one can describe almost any drawing standard – for example, a variety of objects and its display rules for the maps of specific scale or specific function, etc. Drawing standard can be of any subject area.
It is the presence of such drawing standard description files that allows direct drawing in accordance with the selected standard, automation of many drawing creation and preparation processes, object searching in dwg-files, checking drawings for compliance with standards. The essential technological advantage of the definition files usage is the ability for any user to create and edit these definition files, i.e. not to depend on programmers.
ODCLASS uses definition text files of a specific structure, which is much smaller and clearer than in Feature classes XML-files. That simplifies the analysis and work with such files significantly and accelerates its loading during operation.
ODCLASS definition files are so simple that users need no special tools to work with it – just conventional text editors.
The basis of ODCLASS definitions files is made up of drawing standard objects description. Each object is described by a unique name, draw order, acceptable names of AutoCAD entities, set of the acceptable graphic properties and the description of Object Data required. One object can have more than one Object Data.
Object type definition in ODCLASS is performed using object names set in OD character field, defined as a key field. Another character field present in OD description of every object is provided for drawing standard notation. The remaining OD fields are for object characteristics. OD field descriptions contain their names, default values and acceptable values. The acceptable values are described with the range of numbers – for numeric data fields, with lists of acceptable values – for numeric and character OD fields.
OD field descriptions in dwg-files are created automatically when the definition files are loaded.
In ODCLASS definition files except object and their characteristics definition, one can define any AutoCAD variables thus modifying specific dwg-files and AutoCAD workspace parameters. For active dwg-file, the described variables values are determined by ODCLASS when the specific definition file is loaded. Thus, the general settings of the active or new dwg-files and AutoCAD workspace are made by ODCLASS automatically in accordance with the selected drawing standard.
In addition, ODCLASS definition files provide the descriptions to access necessary resource files containing the description of necessary layers, blocks, line types, hatches, text styles, etc. When a definition file is loaded, ODCLASS automatically makes the resources of the specific standard available for the active dwg-file. If the descriptions of necessary resources in the active dwg-file are lost during the session (_PURGE, etc.), ODCLASS will automatically load and make available all the required resources while drawing specific standard’s object.
In sum, the definition files and ODCLASS capabilities automatically provide drawing and setting dwg-files options according to the standard chosen, accelerate AutoCAD customizing greatly, speed up drawing significantly and provide high quality drawings.
Defining objects in ODCLASS
ODCLASS defines graphic elements as objects by attaching to the graphic elements corresponding Object Data with corresponding object class names in OD key field. One graphic element can be defined as several objects at a time, i.e. with several OD. But one object class can define only one graphic element. Furthermore, OD of the same graphic element can be both with different and with the same titles.
This approach provides the opportunity to maintain chain-node data structure in elements’ definitions for their topological validity, and allows describing rather complex database structures.
ODCLASS defines graphic elements as objects in three ways:
- when drawing objects selected from the list, new graphic elements are created with respective OD attached;
- when defining the existing graphic elements as objects selected from the list – with the right mouse button menu;
- when automatically defining the existing graphic elements as objects in accordance with a set of graphic properties – with ODCLASS menu palette, Edit –> Define, in accordance with object definition file loaded.
Definition from object list is made when option “Define” in right mouse button menu is selected after the desired options are selected in “Classification parameters” dialog. With these options one can assign graphic properties, attach OD and add new graphic elements definitions or redefine existing objects.
While object defining, duplicate definitions creation possibility is blocked.
Object redefining involves detaching OD from graphic elements and attaching new OD with the corresponding object class names in the key field. At the same time the sets of graphic properties for the graphic elements are substituted with those corresponding to the new objects class according to object definition file. Furthermore, ODCLASS gives the opportunity to substitute not only layers, line types, line weights, text styles, font height, etc., but also blocks, multiline styles. Redefinition is not made for those graphic elements whose AutoCAD entity class names do not match the new objects class definitions.
Drawing of objects in ODCLASS
Drawing of objects in ODCLASS is generally done the same way as in Feature classes – user selects the desired object in classification list double-clicking left mouse button, the associated drawing command is activated, specific graphic properties are set and after that the element drawn is automatically attached OD with the appropriate object name in the key field. After drawing the corresponding ODCLASS drawing command remains active and the user can immediately draw a new object of the selected type. First difference from Feature classes is the command conformity between ODCLASS and AutoCAD. I.e. there is no need to confirm input with Enter key (like in Feature classes), Esc key is enough.
Other ODCLASS drawing differences compared to Feature classes:
- much greater number of AutoCAD entities used: 3DFace, 3DPolyline, 3DSolid, Arc, Circle, Dimension, Ellipse, Hatch, Mesh, MLeader, Mline, MPolygon, MText, PolyFaceMesh, Ray, Spline, Surface, Wipeout, Xline;
- possibility to insert texts with different rotation angle;
- possibility to accelerate classification list object search using wildcards;
- possibility to accelerate the selection of the desired object using recently drawn and frequently drawn object lists;
- possibility to accelerate the selection of the desired object using custom favorite objects list with custom user-friendly classification.
Using these features can significantly speed up drawing, search, classification. ODCLASS is a powerful and convenient drawing tool, comparable with specialized mapping software or vertical applications.
Object characteristics input in ODCLASS
AutoCAD Map 3D allows user to enter and edit OD fields values in the “Properties” palette, as well as in “Edit Object Data” dialog (command ADEEDITDATA). But in the “Properties” palette there will be no attached OD of the same name if any. There is no possibility in these dialogues to enter and edit field values in reference to the acceptable values.
To enter or edit characteristics in reference to the acceptable values defined in the definition file there is a special ODCLASS palette “ODCLASS_PROPERTIES”. The objects’ names of the selected graphic elements, the names of the attached OD and the OD fields are displayed in this palette. Each OD field is provided with its acceptable values, pop-up lists with these acceptable values or input control check for the compliance with the specified range or list. Invalid values defined in the description file for the input comprehension control are highlighted purple. Invalid values are refused with appropriate warning.
Input and comprehension control of the characteristics can be executed automatically with the appropriate ODCLASS checks as well as with ODEDIT plugin (by means of OD database commands).
Automatic checking and editing in ODCLASS
A complex of standard checks is provided for the consistency control between drawing/database and selected drawing standard.
All the checks process only the selected set of graphic elements and the result is a selection set of graphic elements corresponding the checking criteria. Most of the checks enable the selection of both appropriate and inappropriate graphic elements.
Including search of graphic elements with:
- missing OD fields values;
- invalid OD fields values;
- graphic properties matching no object definition among the definition file loaded;
- graphic properties mismatching its object definitions from the definition file loaded;
- object definitions mismatching the definition file loaded;
- duplicate object definitions.
There is also a number of functions for automatic data editing.
Most of these data edit functions process only selected sets of graphic elements, which is convenient in terms of technology.
Including:
- definition of all selected graphic elements as objects in accordance with its set of graphic properties;
- assignment of a set of graphic properties to all of the selected graphic elements in accordance with their object definition and draw order;
- display of all selected graphic elements in accordance with their draw order;
- numeric OD data field values rounding according to given accepted values;
- graphic elements duplicate definitions purge;
- selected graphic elements definitions purge – detach all OD.
All these checks and actions are possible due to the descriptions of each drawing standard object in object definition file.
As long as many of the basic approaches and possibilities of AutoCAD Map 3D Feature classes (Object classes) are very productive in principle, they are deliberately repeated and used in ODCLASS. Furthermore, due to the possibility of defining one graphic element with several objects, ODCLASS expands the classification capabilities by means of Object Data. ODCLASS has much greater number of entities used, which can increase the speed and quality of drawing and drawing preparation. With ODCLASS it is easier to draw due to implementation of object lists selection service and characteristics values input considering given accepted values. ODCLASS enables the functions for automatic classification of all selected graphic elements as objects depending on the sets of its graphic properties, automatic assigning of appropriate graphic properties and automatic graphic elements display in accordance with draw order. The complex for characteristics values check and consistency control between graphic elements, object definitions and selected drawing standard is added to ODCLASS. Moreover, ODCLASS is provided with a number of useful functions while AutoCAD Map 3D tools based on Feature classes are expanded and some drawbacks are fixes – block substitution when overriding point objects, texts input with different rotation angles, etc.
In sum, ODCLASS is an enhanced implementation of the ideas and approaches used in Feature classes based on Object Data – another AutoCAD Map 3D basis. This enables many other productive capabilities of Feature classes, which unfortunately were not used there. ODCLASS can solve all the tasks related to graphic elements classification, object characteristics definition, internal database creation. ODCLASS helps to simplify and speed up significantly the creation of drawings, to improve significantly their quality, correspondence to the selected drawing standard.
Best results can be reached when ODCLASS is used together with ODEDIT – the application for Object Data handling as an internal database in dwg-files.
ODCLASS together with ODEDIT were tested on several small real projects – from the beginning of the drawing up to the converting into MIF/MID file format. So far, ODCLASS and ODEDIT are the working prototypes of the applications demonstrating good projected results and the enhancement directions of its capabilities.
2015-05-16
Alexander Sharov
Translation: Sheviakov Sergei