ODCLASS
ODCLASS is an application prototype for object drawing
and object characteristics’ definition based on Xrecord AutoCAD ® or Object
Data AutoCAD ® Map/Civil 3D ®.
The possibilities for increasing the productivity and
quality of drawings/object models, drawing processing capabilities build-up, check
automation based on Xrecord or Object Data are modeled and practically tested
in ODCLASS.
The goal of ODCLASS together with other add-ons
(ODEDIT, etc.) – to enable users to create object
models, and to ensure the competitiveness of AutoCAD ®
and AutoCAD ® Map 3D ® as a means of creating drawings/object models,
collecting descriptive data.
The solution is ODCLASS based on Xrecord or Object
Data. It accelerates, simplifies drawing of drawings/object models, allows to define object characteristics, improves the input of
characteristic values. ODCLASS implements the best of AutoCAD
® Map 3D ® Object (Feature) classes concepts, with the addition of many mandatory
features not available in Map 3D. ODCLASS provides the automation of checks and
the achievement of 100% formal quality of the created drawings/object models,
the quality of the entered characteristics’ values.
Version 1.19.2
Alexander Sharov © Russia, Moscow odxclass.odxedit.ac@gmail.com
General information about ODCLASS commands
The
ODCLASS window is invoked with ODCLASS_GUI command.
The ODCLASS window
contains a hierarchical menu of commands, search by object types and the object
type menu window. The object type menu has three tabs: Classification, Recent,
Favorites.
To call ODCLASS
commands from the menu, press the left mouse button once.
To draw from the object
type menu window – double click the left mouse button.
To call ODCLASS
commands from the command line – enter the name of the desired command.
File – object
definition files commands:
Load
Description, ODCLASS_LOAD command – load
the object definition file. Select the txt file with the desired objects’
definition.
In the object type menu window, classes and object types from the loaded definition
file are displayed. Object types classes are displayed with a "+"
sign – a drop-down list.
AutoCAD command line
window (Ctrl + 9) displays the process of the definition file loading with
errors and warning messages.
Reload Description, ODCLASS_RELOAD
command - update the loaded before object definition file.
AutoCAD command line window (Ctrl + 9) displays the process of the
definition file loading with errors and warning messages.
Generate Description
Template, ODCLASS_TEMPLATE command – build a template
for object definition file based on the graphical elements of the active dwg
file. Select the path and enter the name for the created object definition txt
file. In the command line, define the format of object type names: "Format <% t_% i_% L>:".
"t" is the type of AutoCAD
primitive, "i" is the
sequence number of the element, "L"
is the name of the layer. Enter means use default format.
Object definition
file is created – the file the active dwg graphical primitives with the same
graphical properties (color, layer, lineweight, linetype, text style, block
name, etc.). In the definition file, object classes are created according to
the types of graphical primitives available in the active dwg: 3DPolyline,
Polyline, Line, BlockReference, Text, etc. In each of these classes, object definitions
are created with the appropriate types of graphical primitives. For each object type, Xrecord or Object Data is described with the name of
"OD_NAME" and a single od_key data field with the name of "OD_KEY",
intended for the names of object types.
The command processes
both the preliminary and subsequent selection of graphical elements. Enter while
subsequent selection means select all. Graphical elements are processed from non-disabled
and non-frozen layers only.
After the template object
definition file is build, this file can be loaded and used for work. In the usual case, a revision is needed – replacing the names of object
types with custom ones, description of Xrecord or Object data required, adding
characteristic fields in Xrecord or Object data.
ODCLASS_TYPE command – definition of primitive class names (Class Name, Original Class Name)
of the graphical elements specified in accordance with the notation used in
ODCLASS.
The names of the
primitive classes are displayed in the AutoCAD message window. The names of
most of basic AutoCAD primitives have their aliases in ODCLASS (instead of
AcDb3dPolyline - 3DPolyline, etc.), and these aliases are displayed. For the list of such primitives, see ODCLASS_definition_file_structure_v-4,
htm or pdf. The names of any other primitive classes are their Class Name,
Original Class Name – for Proxy Objects.
The command processes
both the preliminary and subsequent selection of graphical elements. Enter
while subsequent selection means select all. Graphical elements are processed
from non-disabled and non-frozen layers only.
The command is valid,
but it is not in the menu.
Edit – object
commands:
Define, ODCLASS_CLASSIFY_AUTO
command – definition of graphical elements as objects based on their graphical
properties specified in the object definition file.
In the command line,
define the value "Undrawable [0/1]
<0>:": 0 - for all types of objects from the definition file, 1
- only for objects displayed in the object menu window.
Graphical elements which graphical properties correspond to those defined
for objects in the definition file, are assigned with the corresponding Xrecord
or Object Data with the corresponding names of object types in the od_key
field.
The command processes
both the preliminary and subsequent selection of graphical elements. Enter
while subsequent selection means select all. Graphical elements are processed
from non-disabled and non-frozen layers only.
Assign Graphical Properties, the ODCLASS_CLASSIFY_AUTO command — assigns graphical elements with
graphical properties in accordance with their object definitions specified in
the object definition file.
In the command line,
define the value "Undrawable [0/1]
<0>:": 0 - for all types of objects from the definition file, 1
- only for objects displayed in the object menu window.
Graphical elements attached with Xrecord or Object Data with object type
names in the od_key fields are assigned corresponding graphical properties. If a graphical
element is defined as several types of objects, then graphical properties of the
highest priority are assigned.
The command processes
both the preliminary and subsequent selection of graphical elements. Enter
while subsequent selection means select all. Graphical elements are processed
from non-disabled and non-frozen layers only.
Restore Graphical Properties, ODCLASS_RESTORE
command – restore graphical properties for graphical elements in accordance
with their object definitions specified in the object definition file.
In the command line,
define the value "Mode [0 (all) / 1
(default)] <0>:": 0 - save the existing graphical properties, if
they are provided with variants of their values, 1 - assign only the default
graphical properties.
Graphical elements attached with Xrecord or Object Data with the names
of the object types in the od_key fields are assigned corresponding graphical
properties.
The command processes
both the preliminary and subsequent selection of graphical elements. Enter
while subsequent selection means select all. Graphical elements are processed
from non-disabled and non-frozen layers only.
Display Order by Priority, ODCLASS_SORT
command – displaying graphical elements defined as objects, in accordance with
the priorities specified in the object definition file.
Graphical elements
defined as objects are displayed in a sequence corresponding to the priorities
of their display — objects with a higher priority are displayed in the
foreground.
The command processes
both the preliminary and subsequent selection of graphical elements. Enter
while subsequent selection means select all. Graphical elements are processed
from non-disabled and non-frozen layers only.
Round values, ODCLASS_ROUND command —
rounding the values of numeric characteristics of Real type to
the number of decimal places specified in the object definition file for each
such characteristic.
The command processes
both the preliminary and subsequent selection of graphical elements. Enter
while subsequent selection means select all. Graphical elements are processed
from non-disabled and non-frozen layers only.
Remove All, ODCLASS_REMOVE_ALL command -
deletes all object definitions of graphical elements.
The command processes
both the preliminary and subsequent selection of graphical elements. Enter
while subsequent selection means select all. Graphical elements are processed
from non-disabled and non-frozen layers only.
Remove Duplicates, ODCLASS_DEL_DUPLICATES
command - deletes all duplicate object definitions from graphical elements.
In the command line,
define the value "Mode (First, Last)
<First>:": First, f, F
- delete the first object definition, Last,
l, L - delete the last object definition. After deletion, only the single object definition of
one type and only one corresponding Xrecord or Object Data remain.
The command processes
both the preliminary and subsequent selection of graphical elements. Enter
while subsequent selection means select all. Graphical elements are processed
from non-disabled and non-frozen layers only.
Properties, ODCLASS_PROPERTIES command –
calls the window for object definitions displaying, viewing, entering and
editing of characteristics.
Check – audit
commands:
Null Field
Values, ODCLASS_SEL_NULL command,
value 1 for Check non-required fields
– search and select graphical elements with non-specified values
of characteristics. Graphical elements which objects have no
defined value for at least one characteristic are selected.
The command processes both the preliminary and subsequent selection of
graphical elements. Enter while subsequent selection means select all.
Graphical elements are processed from non-disabled and non-frozen layers only.
Null Required Field Values, ODCLASS_SEL_NULL command, value 0 for Check non-required fields – search and select graphical elements
with non-specified values of mandatory characteristics. Graphical
elements with at least one non-defined mandatory characteristic are selected.
The command processes both the preliminary and subsequent selection of
graphical elements. Enter while subsequent selection means select all.
Graphical elements are processed from non-disabled and non-frozen layers only.
Illegal Field Values, ODCLASS_ASSERT command,
value 1 for Check non-required fields
– search and select graphical elements with illegal values of
characteristics. Graphical elements which objects have at least one
characteristic with an illegal value are selected. Illegal
value – not corresponding to the lists of acceptable values or
ranges of possible values for numeric characteristics.
The command processes both the preliminary and subsequent selection of
graphical elements. Enter while subsequent selection means select all.
Graphical elements are processed from non-disabled and non-frozen layers only.
Illegal Required Field Values, ODCLASS_ASSERT command, value 0 for Check non-required fields – search and
select graphical elements with illegal values of mandatory characteristics.
Graphical elements which objects have at least one mandatory characteristic with
an illegal value are selected. Illegal value – not
corresponding to the lists of acceptable values or ranges of
possible values for numeric characteristics.
The command processes both the preliminary and subsequent selection of
graphical elements. Enter while subsequent selection means select all.
Graphical elements are processed from non-disabled and non-frozen layers only.
Normal Graphical Elements, ODCLASS_SEL_ALL command, value 1 for Use properties, value 0 for Use
objects, value 1 for Match –
search and select graphical elements with correct graphical properties and corresponding
object definitions. Graphical elements defined as objects which graphical
properties correspond to the object definition file are selected.
The command processes both the preliminary and subsequent selection of
graphical elements. Enter while subsequent selection means select all.
Graphical elements are processed from non-disabled and non-frozen layers only.
Abnormal Graphical Elements, ODCLASS_SEL_ALL command, value 1 for Use properties, value 1 for Use
objects, value 1 for Match –
search and select graphical elements with abnormal graphical properties or
missing object definitions. Graphical elements defined as objects which graphical
properties do not correspond to the object definition file are selected. Or
graphical elements not defined as objects.
The command processes both the preliminary and subsequent selection of
graphical elements. Enter while subsequent selection means select all.
Graphical elements are processed from non-disabled and non-frozen layers only.
Normal Objects, ODCLASS_SEL_ALL command,
value 1 for Use properties, value 0
for Use objects, value 1 for Match – search and select graphical
elements with correct graphical properties and corresponding object
definitions. Graphical elements that are defined as objects which graphical
properties correspond to the object definition file are selected.
The command processes both the preliminary and subsequent selection of
graphical elements. Enter while subsequent selection means select all.
Graphical elements are processed from non-disabled and non-frozen layers only.
Abnormal Objects, ODCLASS_SEL_ALL command,
value 1 for Use properties, value 1
for Use objects, value 1 for Match – search and select graphical
elements with abnormal graphical properties or missing object definitions. Graphical
elements defined as objects which graphical properties do not correspond to the
object definition file. Or
graphical elements not defined as objects.
The command processes both the preliminary and subsequent selection of
graphical elements. Enter while subsequent selection means select all.
Graphical elements are processed from non-disabled and non-frozen layers only.
Own Objects, ODCLASS_SEL_ALL command,
value 1 for Use properties, value 1
for Use objects, value 1 for Match – search and select graphical
elements with object definitions corresponding to the loaded object definition
file.
The command processes both the preliminary and subsequent selection of
graphical elements. Enter while subsequent selection means select all.
Graphical elements are processed from non-disabled and non-frozen layers only.
Foreign Objects, ODCLASS_SEL_CLASSIFIED
command, value 1 for Use properties,
value 1 for Use objects, value 1 for
Match – search and select graphical
elements with object definitions that do not match the loaded object definition
file, or with missing object definitions.
The command processes both the preliminary and subsequent selection of
graphical elements. Enter while subsequent selection means select all.
Graphical elements are processed from non-disabled and non-frozen layers only.
Duplicates, ODCLASS_SEL_DUPLICATES
command – search and select graphical elements with duplicate object
definitions.
The command processes both the preliminary and subsequent selection of
graphical elements. Enter while subsequent selection means select all.
Graphical elements are processed from non-disabled and non-frozen layers only.
Info – commands for displaying information about DWG file objects
and ODCLASS.
Statistics, ODCLASS_STAT command —
displays statistics available in the active DWG file about ODCLASS. Information
about the objects is displayed in a special window.
Data from the Statistics window can be copied
using Ctrl + C.
About, ODCLASS_ABOUT command – displays
About window for ODCLASS.
Data from the About
window can be copied using Ctrl + C.
Search by object type – character input string to search for object types and
their classes containing the specified characters.
While input into the Search bar, only those object types and their
classes are automatically displayed whose names contain these character sets.
An empty search string of object types means the absence of selection
criteria, and consequently the display of all object types and their classes in
the object type window.
Object type
window – menu of object types and their classes from the loaded
object definition file:
When object definition file is successfully loaded, object types and
their classes from this file are displayed in the lower part of the ODCLASS_GUI
window. Classes of object types are marked with “+” sign before their names and
left indent. Click on the "+" sign or double-click on the class name
expands the lists of subclasses and/or their object types.
Double-clicking on the name of the object type activates the
drawing/insertion command and certain graphical properties set for each type of
object in the definition file. Drawing/insertion of selected types of objects
can be performed until canceled (Esc, etc.) or until another type of objects is
selected. When drawing/inserting, graphical elements of a given type of
primitive are created with certain Xrecord or Object Data attached. In these Xrecord
or Object Data, the key field contains the object type ID and specific data
fields for object characteristics. The required Xrecord or Object Data, the
fields, default values, valid values and descriptions of
characteristics are specified in the loaded object definition file.
Right-click on the object class/subclass name, the menu appears: Remove,
Select, Normal Graphical Elements, Abnormal Graphical Elements, Normal Objects,
Abnormal Objects. These actions are performed only for the
object types of the selected class.
Remove – delete object definitions from graphical elements. Select – select graphical elements
defined as the corresponding objects. Normal
Graphical Elements – analogue of the main menu item Normal Graphical Elements, ODCLASS_SEL_ALL
command. Abnormal Graphical Elements
– analogue of the Abnormal Graphical
Elements main menu item, command ODCLASS_SEL_ALL.
Normal Objects – analogue of the Normal Objects main menu item, ODCLASS_SEL_ALL command. Abnormal
Objects – analogue of the Abnormal
Objects main menu item, ODCLASS_SEL_ALL
command.
Right-click on the name of the object type, the following menu appears:
Define, Restore Graphic Properties, Remove, Select, Normal Graphic Elements,
Abnormal Graphical Elements, Normal Objects, Abnormal Objects, Add to
Favorites. These
actions are performed only for the specified type of objects.
Define – add an object definition to the specified graphical elements. Restore Graphical Properties – analogue
of the main menu item Restore Graphical
Properties, ODCLASS_RESTORE
command. Remove – delete object
definitions from graphical elements. Select
– select graphical elements defined as the corresponding objects. Normal Graphical Elements - analogue of the
main menu item Normal Graphical Elements,
ODCLASS_SEL_ALL command. Abnormal Graphical Elements is an
analogue of the Abnormal Graphical
Elements main menu item, command ODCLASS_SEL_ALL.
Normal Objects – analogue of the Normal Objects main menu item, ODCLASS_SEL_ALL
command. Abnormal Objects – analogue
of the Abnormal Objects main menu
item, ODCLASS_SEL_ALL command. Add to Favorites – add an object type
to the Favorites tab of the ODCLASS window.
Commands process both the preliminary and subsequent selection of
graphical elements. Enter while subsequent selection means select all.
Graphical elements are processed from non-disabled and non-frozen layers only.
Classification tab – display of all object types and their classes from the
loaded object definition file in the menu:
At the bottom of the ODCLASS_GUI window all types of objects and their
classes from the loaded object definition file are displayed.
The Classification tab is the main layout of the object type menu, containing
the Search object type string.
Recent tab – display of object types used from the loaded object definition
file in the menu:
In the lower part of the ODCLASS_GUI window, object types from the loaded
object definition file that were previously used for drawing are displayed.
Types of objects are arranged in a sequence of frequency of their use – often
used are placed above.
For object types in
the Recent tab, all actions are available in the same way as in the
Classification tab.
Favorites tab – display of user-selected object types from the loaded object
definition file in the menu:
At the bottom of the ODCLASS_GUI window, user-selected object types from
the loaded object definition file are displayed. The types of objects are
arranged in the sequence of adding them to Favorites – previously added are above.
User can move any type of object to the desired place with drag and drop.
User can create sections ("classes") of object types list by
clicking the right mouse button on the empty line. In the activated
field, the section name is entered. The number of
sections and their mutual position is not limited. User can move any section to the desired place with drag and drop.
For object types in
the Recent tab, all actions are available in the same way as in the
Classification tab, except for Add to Favorites. In the Favorites tab for all types of objects and sections in right
mouse button menu Remove from Favorites item is available – remove selected
types of objects or their sections from the list.
The ODCLASS_PROPERTIES window is intended for displaying object data, for
entering and editing characteristic values.
The
ODCLASS_PROPERTIES window is invoked by the ODCLASS_PROPERTIES command.
In the upper part of the ODCLASS_PROPERTIES window, the object
definitions of the selected graphical elements are displayed. In the middle of
the window, Xrecord or Object Data attached to graphical elements is displayed.
In the lower part of the ODCLASS_PROPERTIES window, the Xrecord or Object Data
fields of the specified object types are displayed as a table. Xrecord or Object
Data fields (Field column) are intended for the values of object characteristics
(Value column). Also the types of fields are displayed in this table – char, int, real (Type column),
restrictions of values (Range column), descriptions of characteristics (Description
column).
In the Type column, fields with a single possible value are marked in
gray, fields that are optional for the definition are marked in green, and mandatory
fields are marked in white.
In the Value column, valid values of fields are marked with white,
fields with a single possible value with gray (not editable), fields with
different values for several objects – blue, fields with illegal
values – magenta.
In the cells of the Value column, one can enter and edit the desired
values, select options from the lists if the lists are defined.
All basic actions of ODCLASS application correspond to their commands, which
can be called from the command line, from other applications, and used in
macros.
ODCLASS commands contain both known and unnoticed yet shortcomings. Your
findings as well as your wishes or opinions can be reported to the specified mail,
to the publication source or in ODCLASS forums.
After quitting AutoCAD, system warnings may appear. These are the
consequences of programming under condition of lack of documentation for
AutoCAD Map 3D. AutoCAD or any other program workflow problems do not arise.
Version 1.19.2
Alexander Sharov © Russia,
Moscow odxclass.odxedit.ac@gmail.com
08.12.2018