AutoCAD Information Extractor

This page describes how to use and customize the AutoCAD Information Extractor template.

When to use this information:

Use this page when you want to create your own integrations or tools for retrieving AutoCAD information and generate an xml document that can be used as an input to the Docman API Tester.

Contents

Introduction

The directory \docman\template\docman\DwgDataExtractor\ contains the code for the AutoCAD Information Extractor. It is a small project with the goal to show how you can easily create your own integrations or tools for retrieving AutoCAD information and generate an xml document. This xml document can be used as an input to the Docman API Tester that allows you to creating and importing documents in IFS Document Management, using standard APIs in DOCMAN.

Note: This code is unsupported by R&D. If you want modify or add new features, add it yourself. We might or we might not update this template code when doing new releases.

The project contains an example that fetch all the AutoCAD drawings located in the sub-folder named Documents and iterate through those and generate a named metadata file, (in this case a XML file) to define attributes and file name for documents that are to be imported. The small export tool could actually be useful in real life, but probably it is needed to extend the code to set extra attributes on the document title and revision.

Because we do not always know the document number when creating the metadata file, we have selecting the very light version that Docman API Tester supports. There are two versions of the XML: Either a very simple format introduced by the Docman API Tester, or the format the component AIIM uses. The AIIM format has a limitation that document number must be filled in.

The code is Visual Basic Application code and should be easily to load and edit with any version of AutoCAD, later than version AutoCAD 2004. In some cases the AutoCAD Library reference may needed to be changed to work with the version on your machine. In later versions of AutoCAD some VBA support is needed to be installed for running the VBA macros.

All the code of bigger interest is located in the file DrawingInformationExtractor.dvb. The code is fairly well commented and documented within the code. If you want to extend the code, it is recommended that you follow all events that are triggered from the moment the user clicks a certain button.

Usage

  1. To run, please start AutoCAD and select the Tools -> Macros -> Load Projects... command.
  2. Select the file DrawingInformationExtractor.dvb from your file structure and press Open.
  3. Accept the Enable Macros message to load the macro into AutoCAD.
  4. You can now start the macro by selecting the macro in the Tools -> Macro -> Macros... dialog and press Run.


To edit the code, after loading the project, see the previous step select Tools -> Macro -> Visual Basic Editor.