BackToCAD Technologies LLC | Artificial Intelligence and Software Developing | Clearwater, USA; Stuttgart, Germany | Kazmierczak® Company
Working with attributes
An attribute is a particular entity that you can save as part of a block definition. Attributes consist of text-based data. You can use attributes to track such things as part numbers and prices. Attributes have either fixed or variable values. When you insert a block containing attributes, the program adds the fixed values to the drawing along with the block, and you are prompted to supply any variable values.
After you insert blocks containing attributes, you can extract the attribute information to a separate file and then use that information in a spreadsheet or database to produce a parts list or bill of materials. You can also use attribute information to track the number of times a particular block is inserted into a drawing.
Attributes can be visible or hidden. Hidden attributes are neither displayed nor printed, but the information is still stored in the drawing and written to a file when you extract it.
You add an attribute to a drawing by first defining it and then saving it as part of a block definition. To define an attribute, you specify the characteristics of the attribute, including its name, prompt, and default value; the location and text formatting; and optional modes (hidden, fixed, validate, predefined, and locked).
To define an attribute Advanced experience level
Do one of the following to choose Define Attributes:
In the Define Attribute dialog box, type the name, prompt, and default value.
Under Insert Coordinates, specify the location of the attribute, or click Select to select a point in the drawing.
Under Attribute Flags, select the optional attribute modes.
Under Text, specify the text characteristics.
To add the attribute to the drawing, do one of the following:
Editing attribute definitions
You can edit an attribute definition before you associate it with a block and before it is saved as part of a block definition.
To edit an attribute definition
Advanced experience level
Select the attribute definition text to edit.
Do one of the following to choose Properties:
Modify the properties, including name, prompt, default value, and other attribute-specific properties.
Attaching attributes to blocks
You can attach attributes to a block after you define it and select it as one of the entities to include. Include the attributes when the program prompts you for the entities to include in the selection set for a block. After the attribute is incorporated into a block, the program prompts you each time you insert the block, so you can specify different values for the attributes each time you insert it into a new drawing.
Editing attributes attached to blocks
You can edit the attribute values of a block that has been inserted into a drawing.
To edit an attribute attached to a block Advanced experience level
Do one of the following to choose Edit Block Attributes:
Select the block to edit.
The Edit Block Attributes dialog box displays all the attributes attached to the block you select.
Edit the attribute values as necessary.
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:
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. CAD.direct 2019 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 insertion-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 character 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 template file is similar to the one shown here:
To create a template file
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.
Include the necessary fields in the template file.
Save the template file in ASCII text format.
To extract attribute information
Do one of the following to choose Extract Attributes:
Click Select, specify the entities from which to extract attributes, and then press Enter.
Specify the format of the extracted file.
For CDF and SDF formats, specify the template file.
Specify the extract output file.
© Copyright 2019 Expert Robotics Inc. USA . All rights reserved. Kazmierczak® is a registered trademark of Kazmierczak Software GmbH. CAD.direct 2019 is a trademark of Expert Robotics Inc. Print2CAD and CAD2Print 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., and/or its subsidiaries and/or affiliates in the USA and/or other countries. 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.