By Alexander Sharov (Contributor)
This is a non-API article from Alexander, a longtime Autodesk partner.
Object Data in AutoCAD Map 3D is a near-optimal way to describe graphic elements’ additional data in DWG files, which can turn AutoCAD Map 3D into one of the most effective digital mapping software given that the sufficient instrumentation is available.
1. AutoCAD Map 3D overview
AutoCAD Map 3D is a mapping vertical product for AutoCAD, i.e. for the program designed mainly for drawing. Therefore, the first and the most expected and the most justified function of such product is drawing (creation) of digital plans and maps, GIS data preparation, collection and display of initial terrain data as well as initial spatial data in DWG files.
Digital mapping and GIS data preparation consist primarily of maps and plans drawing based on the initial terrain data: aerial interpretation of orthophotos, stereopairs, laser scanning and other remote-sensed data; ground survey data drawing; digitization of raster maps and plans. To create proper digital maps, drawn vector data should be defined with the information on entities and the attributes of terrain objects it represents to allow computer data analysis. Furthermore, for computer spatial analysis it is necessary to ensure digital maps’ graphical data topological correctness.
Thus, the most suitable digital mapping and GIS data creation software should have the most extensive drawing functionality (and CAD answers this purpose above all) and the possibility of graphical elements additional data assigning. In most cases, structure and volume of a digital map object additional data are simple and small. For technological reasons related to high operation speed requirements as well as organizational, technical and other restrictions, a mapping area is usually divided into numerous fragments (sheets), and maps and GIS data are created separately (sheet by sheet) by several users at the same time. There is almost no need for entire cartographical area common database at the map creation and GIS data preparation stage while its creation at the data collection stage is almost impossible since the work is being done by numerous regular and outsourced employees and organizations. In addition it is highly desirable to carry out drawing and additional data definition with a single easy-to-use software product with minimum of add-ons, settings, etc. In other words, it is reasonable to use internal databases for additional data definition. AutoCAD Map 3D generally has all the necessary capacities to create digital maps and GIS data as well as to perform cartographical and GIS tasks directly in DWG files.
However, in practice, AutoCAD Map 3D is not a widely used, recognized software product for digital mapping while its popularity and usability in terms of these tasks considerably falls behind the other corresponding software products.
The weak point of Map 3D is concerned with its insufficient, inconvenient digital mapping tools for description of graphic elements’ additional (semantic, attributive, user) data. In other words, the weakest side of Map 3D is insufficient ensuring of the key quality that distinguishes digital maps and GIS data from maps drawn for direct human perception.
At the same time, AutoCAD Map 3D offers three ways to describe additional data when working with DWG files: with the use of external databases and two internal ways – Feature classes and Object Data.
The use of external databases will not be examined here as this way to create maps and initial GIS data is not quite feasible and productive. This way requires additional software expenses, work complication, higher user skills and increased computer resources. Thus, it becomes almost impossible to involve many experienced mapmakers, freelancers and small enterprises in the work.
Moreover, the use of external databases is always associated with a principal problem of graphical data and descriptive database inconformity. There are also risks of losing additional data files with due to technical reasons, during data transfer, etc.
This problem is resolved by the use of internal databases in DWG files. AutoCAD Map 3D offers two ways to describe the additional data with the help of internal databases: Feature classes and Object Data.
In principle, Feature classes (Object classes, FC) can be considered as a possible solution for graphical elements’ additional data description. The main advantage of FC is a convenient object menu for drawing with FC attaching to drawn elements. FC allow identifying graphical elements by their Class name and describing object properties with the help of user data fields – Custom properties. The most important positive sides of FC include a sufficient set of commands for object creation and data manipulation with FC attaching, selection by FC. All the additional data on graphical elements in the form of FC is saved directly in DWG files.
However, Feature classes have a number of restrictions and disadvantages, the principle one is no possibility to attach more than one FC to a graphical element. That is, when using FC, it is impossible to define file elements the way it is necessary to maintain topologically correct chain-node data structure when describing primarily areal objects. Due to the same reason, the creation of topological models (“topology”) and both areal and linear objects with FC requires excessive efforts and is not productive. But there is a disadvantage related to the additional data description – when redefining FC object it is impossible to detach or edit the data correctly.
These and other reasons prevent Feature classes to become popular among AutoCAD Map 3D users. FC are virtually not used for mapping.
Besides, AutoCAD Map 3D gives an opportunity to connect Feature classes and Object Data – to assign specific Feature classes to certain Object Data, what helps to define an object right after its creation (with corresponding FC) and to describe its characteristics and attributes (in of corresponding Object Data fields). In some cases, this can be rather convenient, but there are also some drawbacks. The joint usage of Feature classes and Object Data leads to the summation of its disadvantages and restrictions while new disadvantages appear due to Feature classes and Object Data overlapping. The principal disadvantage of this scheme is the same as of Feature classes – it is impossible to define one element simultaneously as a part of several objects, i.e. topologically correct chain-node data structure maintenance remains complicated.
Object Data (OD) – another way to describe AutoCAD Map 3D graphical elements additional data, which was developed long before Feature classes. The situation with Object Data in AutoCAD Map 3D is very contradictory. However, it is technically easy to overcome Object Data drawbacks, whereas their advantages give reasons to believe that Object Data are undeservingly underestimated being the simplest already existing and the most technologically feasible way to describe AutoCAD Map 3D graphical elements additional data. In the short term, the advantages of Object Data may let it not only compete with Feature classes in AutoCAD Map 3D, but also set them and AutoCAD Map 3D apart from other mapping software.
Therefore, we will further examine AutoCAD Map 3D Object Data.
2. AutoCAD Map 3D Object Data overview
Object Data (OD) – data blocks designed for AutoCAD Map 3D graphical elements’ additional data storage. These blocks are defined with unique names and fields sets. It is a special command with an intuitive and simple interface in AutoCAD Map 3D that allows users of any qualification and with any access rights to create and edit OD descriptions directly in AutoCAD Map 3D.
Object Data allows identifying graphic elements as cartographic objects by attaching corresponding OD and describing object characteristics in the data fields.
Users can attach any given OD to graphical elements of any type. Moreover, any number of identical or different OD can be attached to one element. Users can enter necessary object characteristics values in the OD fields. OD descriptions and records are saved directly in DWG files.
Thus OD is simple, intuitive and, consequently, potentially feasible and reliable way to describe additional data of graphical elements in DWG files.
Nevertheless OD in AutoCAD Map 3D is not equipped with an adequate set of tools for its full and productive usage.
Being used in many AutoCAD Map 3D key functions, for many of them OD is not a data selection criteria. Moreover, OD is not included into the most important AutoCAD Map 3D functions – Drawing Cleanup for topological check-ups and data correction as well as “topologies” creation to form areal, linear and point objects from graphical elements.
It can be claimed that OD in AutoCAD Map 3D (in the Autodesk) is not regarded as an adequate and robust way of graphical elements’ additional data defining. Until now there have been only occasional attempts to create AutoCAD Map 3D plugins expanding the capabilities of Object Data. In general, AutoCAD Map 3D users do not regard Object Data as a productive way to define graphical elements’ additional data.
Such situation causes AutoCAD Map 3D users who did not master the use of Feature classes or external databases to decline orders where the attachment of additional information to graphical elements is required. Often while working on such orders the choice is made not in favor of Autodesk but in favor of other developers’ mapping software where additional, semantic information is defined in a more technically convenient way.
Despite the above, OD in AutoCAD Map 3D potentially has such an advantageous set of capabilities that its definitely underestimated position can be stated. OD can help to implement the complete technology for digital planning and mapping as well as for GIS data preparation. This technology is more effective in all senses than Feature classes and external databases usage in AutoCAD Map 3D and more productive than in most other popular cartographic and GIS environments.
3. Object Data commands available
Currently there are only five special commands in AutoCAD Map 3D to work with Object Data:
- _ADEDEFDATA to create and edit Object Data descriptions.
This command is used to create Object Data descriptions composed of OD name that is unique within the DWG file (up to 25 characters) and value fields of type integer, char, point or real. The fields are defined with unique within one OD (up to 31 characters) names, descriptions (up to 40 characters) and default values (up to 132 actual characters though character fields are defined as 254 characters after export).
Cyrillic characters can be used in OD names and OD fields.
There is no limit of Object Data descriptions in DWG file. The number of fields in one OD is also unlimited. Real files observed to contain more than a hundred OD descriptions and more than thirty fields in one OD.
This command also allows Object Data descriptions editing – rename OD, remove descriptions, remove fields, change field descriptions and default values, add new fields.
- _ADEATTACHDATA to attach/detach Object Data to/from graphic elements.
This command is used to attach Object Data to selected graphic elements, remove attached Object Data and define field values.
Several OD including identical can be attached to one graphic element.
The option of the identical OD overwriting is available, i.e. one can choose whether to remove the previous OD record or to create a duplicate.
The allowed number of OD per graphical element is not determined.
- _ADEEDITDATA to edit and add/remove similar Object Data.
This command makes it possible to browse the Object Data attached to the specified graphic element, examine and edit the field values. It is also possible to add similar OD attached to this graphic element, remove OD, browse all duplicate OD and edit field values.
- _MAPDIGISETUP to setup drawing with simultaneous Object Data attachment.
This command is used to determine a graphical element entity class (block, polyline, 3D polyline) to draw, the layer for this element, name and insert options for blocks, width and line type for polylines, the Object Data immediately attached to the element.
This command only partially refers to Object Data commands because Object Data attachment to the drawn elements is optional.
This command makes it possible to describe only one parameter set for drawing of single type of graphic element with simultaneous attachment of corresponding Object Data at a time. In other words, when describing a new drawing parameter set with OD the previous set is deleted. Consequently, it is impossible to create objects menu for drawing with OD using this command.
- _MAPDIGITIZE to draw with simultaneous Object Data attachment.
This command is used to draw graphic elements defined with _MAPDIGISETUP and define Object Data field values when creating these elements.
Object Data attached to the elements and its fields values are shown by Map 3D in AutoCAD Properties palette (_PROPERTIES) after the graphic elements are selected. This palette allows editing these fields values – similarly to other properties shown in the Properties palette.
This helps to see presence/absence of OD attached to the graphic elements as well as to browse, input and edit OD field values. However, these capabilities are available only for preliminarily selected file elements. Besides, when selecting two or more elements with different OD, the information about OD is not displayed in the Properties palette. Also, OD is not used in Quick Select (_.QSELECT).
4. Commands using Object Data
AutoCAD Map 3D currently has a set of commands that use or take into account Object Data: data export/import commands, data queries and associated commands, commands for work with external databases. However, it is impossible to select graphic elements to work with by its OD – the selection is made by layers, Feature classes and topological models but not by OD.
In addition to these commands where Object Data is used by users, it is also used by AutoCAD Map 3D as a service tool to store information about topological models and connections with external databases. Information about the belonging of the graphic element to the specified topological model or about connection of the graphic element with the external database is stored in file attached to graphic elements in the form of service OD of special structure with special names. One can see these special service ODs with the command for creation and editing of Object Data descriptions — _ADEDEFDATA. Besides, it is possible to see these ODs and its content in the Properties palette when corresponding graphic elements are selected.
5. Object Data implementation drawbacks
The main disadvantage of Object Data implementation in AutoCAD Map 3D preventing its usage for digital mapping and initial spatial data creation is that there is no object menu for drawing based on OD. In other words there is no object menu tool for OD as it was implemented for Feature classes where users can choose the object needed for drawing among the classified objects list while the necessary set of graphic properties is immediately determined and corresponding OD is attached. The command available for drawing setup _MAPDIGISETUP does not allow saving of drawing parameters set description with OD for more than one type of objects.
Another principal drawback of Object Data implementation is absence of specialized tools for search by Object Data, their field values, graphical elements to which Object Data is attached (if any), etc. That is to say there is no simple way (with direct commands) to control the results of OD attachment, to find the errors of incomplete OD attachment and the errors of OD reattachment, to ensure OD fields are filled correctly. Besides, there are no simple (direct commands) tools to search graphic elements with several OD attached including duplicate and various OD as well as tools for duplicate OD detachment.
Many of the above OD operations can be performed with the use of AutoCAD Map 3D queries (_ADEQUERY), etc. However, these tools are too time-consuming or insufficient for mapping.
In addition, the principle disadvantage is the absence of a direct option for browsing the entire content of the specified OD in a table view.
Another considerable drawback of Object Data implementation is that there are no fast ways (direct commands) to fill in OD fields automatically such typical for work with attached data as the creation of unique identifiers, saving of coordinates, lengths, areas of graphic elements in OD fields, etc. In other words, there is no technological possibility to to define additional data attached to graphic elements.
There is a number of OD drawbacks in the process of its description (_ADEDEFDATA):
- Excessive obligatory clicks are needed for all actions in OD descriptions creation window, causing loss of the input data.
- OD are likely oversized because it is impossible to limit the description length of character fields and any OD character field is defined 254 characters long.
- Default values for OD character fields cannot include more than 131 characters, so errors may occur because of too long field values.
- Descriptions” column role is unclear – these values are not used in any OD command, are not displayed in the Properties palette, etc. Thus, these field descriptions add size to OD and are almost useless for the user.
- It is impossible to describe the limitations of OD field values what makes the field values validity check impossible to automate.
- OD field names cannot be changed when OD names can be changed.
- AutoCAD Map 3D does not perceive OD descriptions addition or edit as file changes demanding direct save command, i.e. when DWG file is closed OD description changes might be lost if no other changes were made.
There are also some unpleasant aspects of OD descriptions affecting data exchange between DWG files: if files have OD with same names and identical set of fields, the attached OD may be lost during copy from file to file because of the difference in fields order. Disturbing warnings are also shown during copy if same OD fields describe different default values.
Furthermore, Object Data is not taken into account during two key operations in digital mapping – while topological data correction (_MAPCLEAN, Drawing cleanup) and topological model creation (_MAPTOPOCREATE). Preselected by OD elements could be used for these actions, but there are no tools for element selection by OD in AutoCAD Map 3D. This situation is a direct evidence of the fact that Object Data is not virtually regarded in AutoCAD Map 3D as a comprehensive way to describe additional data attached to graphic elements during digital mapping and GIS data creation.
It is also inconvenient that pre-selection is not used by the commands for OD attachment/detachment (_ADEATTACHDATA) and OD editing (_ADEEDITDATA).
Besides, breaking an element with OD attached causes loss of OD for one of the resulting pieces.
Summing, AutoCAD Map 3D Object Data can be described according to its current state as a secondary, auxiliary tool for graphical elements’ additional data description, which is implemented incompletely and with disadvantages. In principle, it is possible to use OD for digital mapping and GIS data creation at the moment but taking into account its productivity and the above said facts.
6. Object Data advantages
Despite numerous disadvantages and restrictions, AutoCAD Map 3D Object Data has a number of advantages and capabilities which allow us to regard OD as a fundamentally productive possibility to describe graphical elements’ additional data for digital mapping and GIS data creation.
Object Data is an example of internal database – graphical elements’ additional data is stored directly in DWG file. First, such way of additional data storage minimizes the risk of inconformity (loss of connection, additional data loss, “orphan” records in the database) between graphic and descriptive data. Secondly, it minimizes the additional database management. Thirdly, it requires no additional software and at last this way facilitates complete data transfer as much as possible.
Object Data has no defects in the structure and description rules, which would impede its use for additional data description.
Object Data is extremely easy to manage – user of any level can create and edit OD descriptions.
Object Data makes it possible to save the proper range and volume of additional data for digital maps and initial GIS data.
Object Data is easy to use – users can attach/detach OD directly to/from graphic elements.
The practice of Object Data usage shows that OD is quite reliable, does not cause file and or AutoCAD errors, including basic AutoCAD.
Creation of OD addition commands does not require complex programming while these commands help to overcome easily all the disadvantages of OD implementation in AutoCAD Map 3D. This is proved by both the experience of additional OD commands creation and the presence of the commands similar to those necessary for OD in AutoCAD Map 3D.
It is of crucial importance that several different OD can be attached to one graphic element what allows to realize topologically correct chain-node data structure in AutoCAD Map 3D when describing areal objects without duplicating their contours.
Object Data as a way of additional information storage have no analogues of the same compactness and simplicity among the specialized cartographic or GIS software products.
7. Modifications and additions required for Object Data productive usage
AutoCAD Map 3D adaptation in order to use all of the Object Data advantages requires neither considerable modifications of OD descriptions, nor available commands changes and serious efforts to add missing commands. Generally, it is possible to avoid any OD description or existing commands modifications.
All possible modifications and additions are listed below:
- add OD descriptions reading from another file;
- mark file as changed after OD descriptions are created or edited;
- eliminate excessive clicking in OD description windows – in _ADEDEFDATA;
- add descriptions of OD field value limitations in order to control data (e.g. instead of column “OD Field description”);
- change the type of 254 characters long fields to String (n), i.e. string of the specified length;
- associate the default value length with character fields specified length;
- remove or block the possibility of duplicate OD attaching;
- consider the difference in OD descriptions field order and in default values during copy of OD attached elements from file to file as non-significant;
- add object menu in order to select necessary objects from the classified list and draw elements of the type, properties and OD set defined for each object. The direct prototype of such object menu – Feature classes drawing menu. One may use XML files of the same structure and with same service as for Feature classes, but with a different main result – with OD attachment;
- add processing of preselected elements for OD attachment/detachment command (_ADEATTACHDATA);
- add commands for selection of graphical elements with OD attached, without OD attached, with duplicate OD attached, with multiple OD attached, with OD of specified values attached, etc.;
- add commands for OD attachment/detachment by various attributes – attach OD by samples, detach duplicate OD, detach specified OD, etc.;
- add OD contents table view – as external database contents table view; ensure coordinated OD browsing and editing between table view and graphical elements;
- add commands for OD fields input and edit automation – for IDs creation, graphical properties storage, value replacement, etc.;
- add commands for OD fields filling with texts values adjacent to graphic elements with these ODs;
- add commands for OD field input check-up;
- add element selection by OD for drawing correction commands (_MAPCLEAN, Drawing cleanup) and for topological model creation (_MAPTOPOCREATE).
Some other commands can be added to carry out operations with OD or to check graphic elements for OD presence e.g. element type conversion keeping OD, transfer Feature classes additional data descriptions to OD, etc.
The total number of required additional commands for OD could be about 40-60. Many of these commands are quite easy to develop. The most complicated have working prototypes in AutoCAD Map 3D. The experience in OD commands development as well as the existence of successfully working prototypes allows us to assume that such set of commands and modifications can be implemented by 2-3 experienced programmers within just 2-3 months including testing, debugging and user manual writing. Many of these commands are so simple that one programmer can create up to three such commands a day.
8. Object Data prospects
As it was mentioned above, AutoCAD is one of the world leading CAD software and one of the leaders in geodesics, cartography, etc., as a drawing facility. AutoCAD holds the major part of both global and local drawing software markets. AutoCAD Map 3D at the same time holds incomparably lower place in the corresponding geodesics and cartography sectors while users often have to transform their graphical data into digital maps or GIS data using third-party software. Alternatively users have to reject AutoCAD in favour of other developers. For the same reason other developers of the specialized software do not take into account or insufficiently take into account AutoCAD Map 3D capabilities to exchange data with it.
The key reason for such situation is that AutoCAD Map 3D has no convenient, simple, complete and reliable way to describe entities, objects and its characteristics during digital mapping and GIS data creation which can be learnt by most unskilled computer users e.g. mapmakers and operators building primary cartographic data.
Great drawing capabilities of AutoCAD will always encourage users to regard AutoCAD Map 3D as a tool for creation and drawing of digital maps and initial GIS data. On the other hand, various sources external data connection, data analysis, design, etc., do not require great AutoCAD drawing capacities making up the major part of AutoCAD Map 3D cost and will therefore be regarded as unreasonable expenses by users.
Object Data advantages suggest that the mapping vertical product of AutoCAD Map 3D will become the most effective tool to describe graphic objects’ additional data while digital mapping and GIS data creation after the corresponding modifications and commands addition.
Definitely, it is preferred to expect that Autodesk will modify Object Data by itself – it would be better, easier, more productive and cheaper for users. Surely it is possible that third-party developers will also create AutoCAD Map plugins for the better Object Data workflow, but the quality of such plugins could be questionable whereas its usage would require additional costs and could bring unpredictable results.
AutoCAD widespread distribution all over the world in the fields of geodesics and cartography and the extreme simplicity of Object Data allow us to expect that AutoCAD Map 3D has a reasonable chance to break through with the help of Object Data modifications and become one of the most popular digital mapping and GIS data preparation software.