CAD CAM CAE - CADinfo.net - home

 microsites>> SmartDraw - CAD results without CAD hassles  

CAD, CAM, CAE, design, technical drawing, drafting, delineation, visualization, manufacturing ISSN 1442-2255 : 11/21/2009 - 8:49:34 PM
 

DwgAccess v2.20 - Review

Geoff Harrod

DwgAccess is an AutoCAD drawing data access engine. Unlike programs with dedicated purposes, such as file format conversion, layer renaming, or text searching, DwgAccess is unlimited in scope. It is used for extracting and/or updating many different drawing elements. It was originally written to speed up custom program development time by standardizing data extraction and update functions.


advertisement

DwgAccess provides a generic system for extracting user-specified categories of data from one or a large number of DWG files, into a DataBase Management System (DBMS) such as Microsoft Access, Oracle or SQL/Server. Once extracted, manipulations of the data can be done in the database system by means of the data system’s commands or the SQL database script language. Finally the altered data can be written back to the DWG files to update the actual drawings, and/or the results of the data manipulations can be exported to other formats for reports or for updating the user’s office-wide Electronic Data Management system (EDM).

DwgAccess can handle all DWG versions up to and including 2000

The process of using 'DwgAccess' consists of:

  1. Constructing lists of drawings to process.
  2. Selecting the kinds of data to extract.
  3. Extracting the data and exporting it to DBMS tables.
  4. Processing the data into Reports or Update values
  5. Importing update values and executing the update.

'DwgAccess' handles items 1, 2, 3 and 5. Item 4 is to be handled in the DBMS by the user’s own methods. If SQL scripts are written to perform the database operations, they can be carried out from within DwgAccess making it a much more straightforward task.

 

The dataflow using 'DwgAccess'
The dataflow using 'DwgAccess'

Two kinds of expertise are required...

  1. a thorough understanding of the inner workings of AutoCAD, 
  2. and a thorough understanding of database query writing in the chosen DBMS.

DwgAccess can execute SQL scripts for automated operation of the data manipulation stages within the DwgAccess session. For those who are not proficient in writing standard SQL, some DBMS programs, such as MS Access, have tools to generate SQL scripts using Wizards and other Visual techniques.

For those with needs for bulk AutoCAD data manipulation but who lack the above skills, Ahrens & Associates can develop custom systems to carry out whatever is wanted without any need for user understanding of the technicalities involved. For cases where user skill is available but all the facilities are not needed, restricted feature versions of DwgAccess are available at less cost. The full feature package costs US$2,750.00. If you have ever build ( or attempted to build) custom software to do anything like this, you will realise that this is very good value.

Demo Version

A demo version is available over the internet which allows potential buyers to determine if the system is suitable for their expertise and situation. The demo license restricts drawing lists to 30 and drawing size to 512k. This kit is supplied with a set of 4 demo scenarios and data sets, which give a very good feel of what the system can do. If further evaluation seems warranted, a version that is unrestricted in scope but time-limited can be obtained. The basic demo kit runs for 30 days from order, with possible extensions. The further evaluation kit requires information to lock it to the user’s computer. This review was written on the demo version.

Demo 1 demonstrates using DwgAccess to package AutoCAD drawings for outside users, ensuring that the drawings are in the correct file version, all relevant components are included, and all internal cross-referencing is fully resolvable.

Demo 2 demonstrates using DwgAccess to rename AutoCAD drawings from the old DOS 8.3 format to long names, changing file names and making the corresponding internal changes to the drawing files.

Demo 3 demonstrates using DwgAccess to process batches of drawings into an office’s EDM system.

Demo 4 demonstrates using DwgAccess to reorganise the naming of blocks, styles, layers etc to match a particular office standard.

[The current version (3.0) also has the ability to Add (and/or Delete) Attributes to existing Inserts and create new Inserts with Attributes on the fly. This is useful when legacy drawings have incomplete or missing title blocks. Two new demos (5 & 6) illustrate these features. Ed.]

DwgAccess data extraction is generally used to populate tables in the database. Often this data is combined with data from the user's Engineering Document Management System (EDMS) and/or tables of predefined standards to produce Audit or Compliance reports.

DWG updating is driven by tables of old and new values in the database. These updates may be as simple as error correction to meet standards or as complex as reorganizing drawing paths to fit a new library scheme. It can save changes to an existing file or create an entirely new file, as required. DwgAccess encapsulates complex tasks such as changing Xref paths, which includes changes to blocks, layers, linetypes, viewports, etc. to simple entries in database tables.

For Data Extraction:

  • Open the extraction specification template.
  • Create the external list of drawings to process and import the list.
  • Execute the data extraction.
  • Check the Errors table.
  • Export the Values table for use by other programs.

For Drawing Update:

  • Process the external data to generate the update data for the Values and Drawings tables.
  • Open the update specification template.
  • Import the modified drawings and values tables into DwgAccess.
  • Execute the drawing update.
  • Check the Errors table

Note: Tables are updated first so that new values are available when updating Entitles. For similar reasons, the Linetype Table is updated before the Layer Table.

The DwgAccess Display

DwgAccess uses an Explorer style display with a navigation ‘tree’ pane on the left and a data display pane on the right. Menus and Toolbars provide commands. A status line displays process information.
DwgAccess uses an Explorer style display with a navigation ‘tree’ pane on the left and a data display pane on the right. Menus and Toolbars provide commands. A status line displays process information.

When DwgAccess is started the navigation pane displays four tables under the Database heading:

 

TABLE

DESCRIPTION

1

Drawings:

The list of drawings to process and optionally a SaveAs name

2

Errors:

A log of errors.

3

Specifications:

Rules for handling data.

4

Values:

Data extracted or values for update.

The list pane displays the data associated with the currently selected item in the navigation pane. The list display can be sorted by clicking on column headings.

The Table of Drawings to operate upon is populated by right clicking on Drawings and selecting either browsing or importing. Browsing allows the user to interactively select files (or lists of files). For large lists it may be more convenient to use DOS commands to produce a list in text form, which can then be referenced here. That would be done by a DOS command such as DIR /s/b *.dwg >Drawings.txt

Each import record can contain either one or two fully qualified paths per line. The first path on each row specifies the file to read. If only one path is specified, an update operation will overwrite this file. The second path is the optional SaveAs path to which an updated file will be written. Browsing does not populate the second path, as it is inherently something the user will need to define.

As each drawing completes processing, its entry is removed from the list. This allows the process to be interrupted, saved and resumed at a later time. Files other than drawings are ignored, except that, during a drawing update, files with SaveAs paths will be copied to the new locations. This is useful for migrating support files with the main drawing set.

The Errors table is populated by DwgAccess during processing. Each entry includes the name of the drawing in which the error occurred, the name of the error, and the reason for the error. Once an error is encountered further processing is abandoned and any update file is not saved. The list of errors can be exported, but in any case should be checked every time an operation is performed.

The third item under Database in the navigation pane is the table of Specifications. This list is a table of data types for each kind of data currently supported by DwgAccess. If you expand Specifications in the navigation pane and select each data type, the list pane column headers will display the names of the individual data fields associated with each data type. Right clicking on a data type in the navigation pane displays a popup menu which allows a user with authoring rights to add new filters and set the data type properties.

The last item under Database in the navigation pane is the table of Values. This list is composed of tables of data containers, which can be either the (global) container or a Path container for each drawing. Each data container is composed of tables of data types, which in turn are tables of data keys and values. For data extraction, data containers are created by the program, in accordance with the Specifications, and are used for storing the extracted data.

Navigation pane showing the Database|Values item and its list of options
Navigation pane showing the Database|Values item and its list of options.

Summary

I found the operation of DwgAccess slightly confusing at first because several key operations can only be done by right-clicking fields in the tree display and selecting from the menu that pops up. Once you understand this procedure, helped by following the step-by-step instructions in the demo text files, operating DwgAccess is straightforward. The extraction of drawing data into the database can seem to take quite some time. The display status bar shows ‘Processing’ and various progress bar graphs during this stage, and then shows ‘Ready’ when finished. Although this might seem slow, when you consider how much data is being searched and sifted, how many DWG files are being processed, and how long it would take manually in AutoCAD or with the aid of a Lisp program, then you realise that it is in fact a very efficient operation.

The use of SQL script files is highly desirable, as that enables everything to be done from DwgAccess without needing to know how to manipulate the database system. A sample extract of an SQL file supplied with the demo kit is shown here so you can see the form they take. Writing SQL is a specific skill that requires training, like most data manipulation tasks.

;;CREATE VIEW qd10 AS SELECT Values.B FROM [Values]
;; WHERE (((Values.Type)="Shape file"));
;
; Make sure all Fonts have .SHX
;
UPDATE qd10 SET qd10.B = qd10.B & '.shx'
WHERE (((qd10.B) Not Like "%.%"));
;
; Find fonts not in the Company Fonts table
;
;;CREATE VIEW qd11 AS SELECT qd10.B
;; FROM qd10 LEFT JOIN AlwFonts ON qd10.B = AlwFonts.Fonts
;; WHERE (((AlwFonts.Fonts) Is Null));
;
; Populate Errors with missing Fonts
;
INSERT INTO Errors ( Path, Error, Reason )
SELECT qd11.B, 'Shape file' AS Expr1, 'Unsupported font' AS Expr2
FROM qd11;
;

DwgAccess is a unique and extremely powerful tool that will appeal to system developers and to office systems supervisors. If it sounds like a tool that may be useful to you, visit the Ahrens web site and obtain the demo kit. You will need to have MS Access or some other DBMS operational on your system, as well as AutoCAD.

Click to tell a friend about this page...

Please rate our article...
Click on a button to rate this article Click on a button to rate this article
 

Resource Center

DwgAccess

 

 

Sponsored Links

AnyDWG Offers DWG to PDF, DWG to DXF, PDF to DWG, DWG to JPG, PDF to DXF Converters

AutoDWG offers DWF to DWG, DWG to PDF , PDF to DWG, DWG to Flash Converters, DWG Viewer.

eCampus.com
Get your stuff for College... Cheap!
Textbooks, Greek Gear, DVD's, University Clothing, Computers and MORE!

Access Your PC from Anywhere
Free Trial plus 10% Off!

 

 

Footer
   
All rights reserved © 1996-2007 Digital Business Media Pty Ltd  home : editorial archive : contact : legal