Subject: Extracting attribute information

You can extract attribute information from a drawing and save it to a separate text file for use with a database program. You can save the file in any of the following for­mats:     

   Comma Delimited Format (CDF) Contains one line for each instance of a block, with individual attribute fields separated by commas. Character string fields are enclosed with single quotation marks. You must specify a template file when extracting to a CDF file.       

   Space Delimited Format (SDF) Contains one line for each instance of a block. Each attribute field has a fixed length; there are no separators or character string delimiters. You must specify a template file when extracting to a SDF file.       

   Drawing Exchange Format (DXF) Creates a subset of a standard DXF file (a *.dxx file) containing all the information about each block, including the insertion points, rotation angles, and attribute values. No template file is required.       

Before extracting attributes to a CDF or SDF file, you must create a template file. The template file is an ASCII text file that specifies the attribute data fields to be written in the extract file. Each line of the template file specifies one attribute field.
CADdirect recognizes 15 different fields, which contain elements such as the block name, the x-, y-, and z-coordinates of its insertion point, the layer on which it is inserted, and so on. You can include any of these fields. The template file must include at least one attribute name.        

Each line in the template file must start with the field name. Block name and inser­tion-point values must begin with BL:. The next nonblank character must be either a C (indicating a character string field) or an N (indicating a numeric field). This char­acter is then followed by three digits indicating the width of the field (in characters). The final three digits indicate the number of decimal places (for numeric fields). In the case of character fields, the last three digits must be zeros (000). A typical tem­plate file is similar to the one shown here:             

 

A   Field name.

B   Block name. Block names must begin with BL:.

C   Insertion point. Insertion-point values must begin with BL:.

D   Attribute tags.

E   Number of decimal places for numeric fields or 000 for character fields.

F   Field width for character or numeric fields.

G   C for character fields; N for numeric fields.

To create a template file

   1   Create a template file using any ASCII text editor (such as Microsoft® Notepad or Microsoft® WordPad) or a word-processing program such as Microsoft® Word.

   2   Include the necessary fields in the template file.

   3   Save the template file in ASCII text format.

To extract attribute information

   1   Do one of the following to choose Extract Attributes ():

   On the ribbon, choose Insert > Extract Attributes (in Block Definition).

   On the menu, choose Tools > Extract Attributes.

   On the Tools toolbar, click the Extract Attributes tool.

   Type ddattext and then press Enter.

   2   Click Select, specify the entities from which to extract attributes, and then press Enter.

   3   Specify the format of the extracted file.

   4   For CDF and SDF formats, specify the template file.

   5   Specify the extract output file.

   6   Click Extract.

Extracting_attribute_information
© Copyright 2023. BackToCAD Technologies LLC. All rights reserved. Kazmierczak® is a registered trademark of Kazmierczak Software GmbH. Print2CAD, CADdirect, CAD.direct, CAD Direct, CAD.bot, CAD Bot, are Trademarks of BackToCAD Technologies LLC. DWG is the name of Autodesk’s proprietary file format and technology used in AutoCAD® software and related products. Autodesk, the Autodesk logo, AutoCAD, DWG are registered trademarks or trademarks of Autodesk, Inc. All other brand names, product names, or trademarks belong to their respective holders. This website is independent of Autodesk, Inc., and is not authorized by, endorsed by, sponsored by, affiliated with, or otherwise approved by Autodesk, Inc. The material and software have been placed on this Internet site under the authority of the copyright owner for the sole purpose of viewing of the materials by users of this site. Users, press or journalists are not authorized to reproduce any of the materials in any form or by any means, electronic or mechanical, including data storage and retrieval systems, recording, printing or photocopying.