Design Features of DXE
(Drawing eXchange Engine)
Why we are explaining the design features of DXE
- DXE is our core-programming engine for reading, writing, and displaying AutoCAD drawing and DXF files. It has been the basis for our award winning products for the last ten years and serves as the basis of Vdraft, our new CAD program.
- It demonstrates that Vdraft is built on a solid, flexible foundation.
- It points out several advantages we have over systems like AutoCAD.
Design features of the reading and writing portion...
- DXE reads, writes, and displays AutoCAD drawing (DWG) and DXF files. DWG and DXF are treated identically - the calling program doesn't need to be aware of the differences. This allows Vdraft to edit and save DXF just as easily as it does DWG.
- Any number of DWG and DXF files can be worked with simultaneously.
- DXE can work with DWG and DXF from AutoCAD version 2.5 up to and including AutoCAD 2002.
- DXE is designed with multiple layers for increased flexibility. For example, the programming layer which reads and writes the low level data from a file can be replaced with a layer which reads and writes from memory or from another program, etc.
- DXE currently runs under DOS, Windows 95, Windows 98, Windows NT, Linux, Sun SPARCstation (SunOS and Solaris), Digital DECstation (Ultrix), Data General Aviion, HP-UX, AIX (RS-6000), SINIX-2, Digital Alpha, Macintosh 680x0 and Power PC.
Design features of the display portion...
- Custom routines for displaying lines, solids, and colors can be hooked into DXE's low level display routines. Effectively you can have a drawing completely broken into lines for any type of vector output.
- Complete tools for manipulating views are provided: zoom window, zoom to scale, pan, rotate, named views, etc.
- Output can either be transformed to 2d screen coordinates, to 3d world coordinates, run through insert/block transformations, etc.
You can have an entire drawing automatically displayed, retrieve and display entities one at a time, or even create your own entities and display them.
Uses for DXE
- Translators between DWG and DXF. This only takes a few lines of code to produce backward or forward translators between different versions of AutoCAD.
- Simple - have DXE strip out or add the information that differs between releases.
- Complex - programmer provides interpretations for information that differs between releases.
- Translators between DWG/DXF and other CAD systems. This includes concepts like round-tripping incompatible CAD drawing files through AutoCAD. Catia, PTC, and Solidworks based drawings can be edited in AutoCAD without any drawing information lost. It should also work that other CAD systems could edit AutoCAD drawings in their systems and maintain all the original information. The round-tripping concept should work both ways providing CAD drawing editing with no data loss.
- Translators between DWG/DXF and simple vector or bitmap formats using the display engine to break the complex entities into vectors.
- Create a new drawing out of data from a spreadsheet, database, GIS, etc.
- Extract information from drawings into a text or database format: attributes, extended entity data, total edit time, blocks, layers, etc.
Extract graphic information from one drawing and use it to create another drawing. DXE is the basis for Vdraft CADview, which allows you to view DWG/DXF, print drawings, view block and layer information, area measure, plus many other management features.
Core Programming Design of Vdraft
- DXE and DXED are used for DWG/DXF read and write and to build a display list.
- Entirely designed in object-oriented C++ for code reusability.
- Portable Graphical User Interface (GUI) tools used for increased flexibility and consistency throughout the program design.
- Dialog boxes are designed by grouping user interface controls and telling the objects to arrange themselves into rows or columns, to center or left/right justify themselves, etc. So when the words in a dialog box change (when labels are rephrased or translated into other languages), the dialog dynamically rearranges itself. This means that the dialog box can rearrange itself at runtime based on what kind of information it is displaying. It also means that no one needs to spend time redesigning the dozens of dialog boxes in the program when it is translated into other languages.
- Dialog box controls are organized into an object-oriented hierarchy. The advantage to this is that a control which, for example, works with linetypes can be designed once and reused in all the dialog boxes which reference linetypes: the current linetype toolbar, the layer dialog box, the dozen or so entity property dialogs, etc.
- The current functions attached to the mouse/keyboard are maintained in a stack. This allows the user to perform any action in the middle of any other action. The current mouse state includes the action attached to clicking the left mouse button, the context sensitive popup menu attached to the right mouse button, the mouse-emulating keystrokes (arrows, enter, escape), the instructions displayed on status bar, and context sensitive help.
- All the core functionality is built into a hierarchy of command classes. Each command knows how to execute itself, repeat itself, undo & redo itself, and describe itself to the user. Commands can be grouped together under other commands. Each command the user executes gets stored in the master undo list, which can be accessed through a dialog box. The dialog gives a complete description of all the commands, which have been run, giving the user the ability to easily step through undoing and redoing their actions. A 3rd party Vdraft programmer can tie into the commands through Active X (OLE) Automation so the end user can easily undo or redo any of these actions as well.
- The functionality of the program is exposed to 3rd party developers through Active X (OLE) Automation. This means that there aren't a couple dozen incompatible ways to customize Vdraft (as there are in AutoCAD) just one consistent elegantly designed interface that's accessible from Visual Basic, Borland's Delphi, C++, etc.
Vdraft Data
Vdraft works directly with AutoCAD DWG and DXF files. There is no translation process so no information is lost switching between AutoCAD and Vdraft.
Design Philosophies for the Vdraft User Interface
User feedback
While dragging out new entities, the cursor is snapping to the proper point based on entity snap modes (endpoint, midpoint, etc.), grid snaps, and angle snaps (including ortho snap).
When moving/rotating/scaling new block insertions, text, etc., the object is being displayed as it will appear when the change is finalized.
When selecting a block to insert, you get a graphic preview of the blocks.
If you want to undo the last several actions, you can look at a list describing what you've done and choose how far back you want to go.
Context sensitive options and help
Selecting the right mouse button will display a popup menu filled with options that are relevant to the current action - drawing a line, selecting entities, pasting objects, etc.
The status bar always displays a brief message explaining what actions the user can perform next.
Pressing F1 or selecting help will display complete help on the current action.
All features designed for new users and experienced users
New users are unsure how to perform an action and whether to experiment with a new feature. Context sensitive popups make a wide variety of relevant options easily available. The undo list makes it easy to undo experiments or actions that didn't turn out quite right.
Experienced users know what they want to do and they want to be able to do it quickly. One way Vdraft addresses this issue is through flicks. The context sensitive popup menu is displayed as a 3x3 grid centered on the cursor. When the user gets used to an action being in a certain direction, they can flick to it - hold down the right button and move the mouse in the direction of the option. The popup menu doesn't even need to be displayed. Thus the experienced user can quickly select between context sensitive options with a flick of the mouse. This is quicker than the alternatives: switching from the mouse to the keyboard, moving the mouse all the way to a pulldown menu or to a toolbar, or even bringing up the popup menu before selecting an option.
Simple consistent access to features
In AutoCAD you can modify all the properties of a single entity with ddmodify, some of the properties of an entity or group of entities with ddchprop or chprop, or modify a few more kinds of properties using the change command. With Vdraft, all these functions are performed with the Properties option, which is always available on the context sensitive popup.
Attributes attached to a block insertion are also accessed through the Properties option.
The ability to work with more than one drawing at a time (AutoCAD 2000 finally shares Vdraft’s multiple drawing capability)
You can even cut and paste between drawings.
Most actions can be performed in the middle of other actions
In the middle of drawing a polyline you could change the grid size, turn on or off entity snap modes, pan over, zoom out, bring up the linetype box and define a new linetype, bring up the polyline's property box and change its linetype to the new one, bring up the layer list and toggle the visibility of several layers, open a new drawing and work on it for awhile, ...
You don't have to walk down a predefined path of prompts
If you draw text in AutoCAD you have to answer their questions in order. If you change your mind, you cancel and start over. If need to see how the text looks first to decide something like how big it should be, you need to finish the text then modify it using ddmodify or the non-intuitive change command. If you draw text you...
- pick where you want it to be
- choose the height
- choose the rotation angle
- type in the text
In Vdraft, you can change any aspect of the text at any time, even in the middle of typing it in, since all the options are on a context sensitive popup. If you started typing in your text and realized it won't fit, you could change the height and continue typing.
Useful toolbars are provided for common functions
Toolbars can be individually turned on or off.
Toolbars can be moved around or "docked" to the side of the window for personal customization.
Several toolbars include a list for quick access to layers, blocks, linetypes, colors, etc. plus a button which will take you to a dialog box with complete control over the item.
Use the latest capabilities of Windows NT and Windows 98
Send the current drawing via e-mail to other people across your network.
Long filenames and the Universal Naming Convention (UNC).
Print preview.
Active X (OLE) allows Vdraft to be linked or embedded in another application such as Microsoft Word, Excel, Access or any other Widows OLE .
Active X (OLE) Automation for easy programmability from a large number of other programs.
Active X (OLE) Automation
Why Vdraft is programmable through Active X (OLE) Automation...
- Programmers can customize Vdraft from the tool of their choice: Visual Basic, Borland Delphi, Visual C++, Borland C++, Microsoft Word, Microsoft Excel, etc.
- SoftSource can concentrate on writing a CAD program, not a programming language and debugger and dialog box builder and so on. Companies who concentrate on development tools can provide more powerful full-featured tools, anyway.
- Microsoft is switching the customization tools and macro languages of their office suite (Word, Excel, PowerPoint, etc.) over to Active X (OLE) Automation and Visual Basic for Applications. Vdraft can be customized with the same tools.
What can be done through Automation...
- Information can be retrieved. A program can ask detailed information about drawings, entities, layers, blocks and attributes, etc.
- Information can be created and manipulated. You can create entities, linetypes, etc. or modify existing information.
- Automation tasks can occur while the user is working in Vdraft. Programs can be working with any or all of the drawings Vdraft is working with even while the user is drawing.
Back to SoftSource's main page http://www.softsource.com