Javatpoint Logo
Javatpoint Logo

Attext command in Solid Works

Block Attributes Extraction to a Text File

You may extract Block Attribute values to text files in a variety of formats with the Extract Block Attribute command.

The data to be extracted is specified in template files.

You can use spreadsheet software or other apps to evaluate the retrieved data.

To save Block Attributes as a text file:

1. In the command prompt, type ExtractBlockAttribute.

2. To specify the data to be extracted, provide a template name in the dialogue box's Template field. To search for a file, click.

For details on the file syntax, see Building Template Files for Block Attribute Extractions.

3. To define the entities for Block Attribute data extraction, click Choose Entities.

Temporarily, the dialogue box is closed.

4. Press Enter after selecting Blocks with Block Attributes in the graphics section.

5. Enter the location and filename of the output file under Output in the dialogue box. To choose a file name, click.

6. Choose the file format to use for writing the Block Attributes information in the Format field:

  • File with Comma Separators (CDF). The fields of each Block Attribute record are separated by commas. Single quotation marks encompass strings.
  • Delimited by space (SDF). The fields of each Block Attribute record are separated by spaces. Single quotation marks encompass strings.

7. Choose OK.

Creating Template Files for Extracting Block Attributes

Block Attribute extraction template files specify the data fields to extract and regulate their appearance.

Make a template file for Block Attribute Extractions using an ASCII text editor.

In every line of the template file:

  • It specifies the Block properties to extract along with the Block Attributes.
  • It must employ the precise syntax indicated below.
  • It becomes a column in the output file that results (see example).

A template file must have at least one Block Attribute name.

Filing Format

The template file's lines all utilize the same syntax:

name of field [space(s)] output format

The table below, under "Extraction Field Names," lists all acceptable field names.

output format and field name are separated by one or more spaces. No tabs, just spaces. Press Enter to finish each line, including the final one.

Block Attribute Values Exporting

You may use spreadsheet software or other applications to analyze and assess the data by saving the Block Attribute values of certain Blocks to text files using the Block Attribute Output command.

Use the Block Attribute Position Output command to include the evaluated Blocks' positions in the output text files.

The exported file is a text file with Tab delimiters.

These columns are present in the output file:

  • The Block entities' distinctive IDs are contained in the Block handle column of the drawing Block name column.
  • Identified distinct columns for each Block Attribute definition in the given Blocks
  • Column headings in the first row include names from Block Attribute definitions.

Exporting Block Attribute values to text files is as follows:

  1. BlockAttributeOutput should be typed at the command prompt.
  2. Make the choice of Blocks with Block Attributes in the graphics section. Selecting blocks with the same type of Block Attribute structure is advised.
  3. Enter the key.
  4. Enter the location and file name of the.txt file in the Output file dialogue box.
  5. Press Save.

Block Definitions

A Block is a group of entities that are connected to form a single entity. Once a Block has been created, you can insert it into a drawing whenever you need to.

Just the current drawing is recognized when you use the Make Block command. You may write a Block to an external drawing file using the Export Drawing command to utilize it in any drawing.

Blocks definition:

1. To define, click Draw > Block (or type Make Block).

2. Provide a name for the Block in the dialogue box's Name field or choose an existing Block to replace it. Names may contain letters, numbers, blank spaces, and special characters like $, #, and _. They can also have up to 255 characters. The name must match exactly.

3. Enter a Block description for Description.

4. Choose options from Settings:

  • The scaling annotation. Determines if annotative scaling is used when you insert the Block.
  • To match scale, position the block: It specifies that the Block orientation in Viewports must match the Sheet orientation in the layout.
  • Only if you chose Annotative Scaling for Block Insertions is this option accessible.
  • Use a consistent scale: It limits the scale at which the Block can be inserted. If not, while adding the Block, you can choose a different X, Y, and Z scaling factor.
  • Let the block blow up: It allows the Block to blow up upon insertion.
  • Units: It allows you to choose alternative units than what is shown in the current picture.
  • Include a hyperlink: It gives you the option to define a hyperlink for the Block.

5. Set the base point that will be used as the insertion point when inserting the Block under Base Point. It functions as a rotation point during the insertion and as the starting point for adjusting the scale.

Choose one of these:

  • To specify the base point of the Block in the drawing, click Select in the graphics area.
  • Please enter coordinate values for X, Y, and Z.

6. Subheading Block entities:

  1. To choose the entities that will make up the Block, click Choose in the graphics section.
  2. Make choices:
    • Keep them as distinct things: Leave the source entities in their current state.
    • Switch to block: A Reference to the Block specification is used in place of the source entities.
    • Take out of drawing: Removes the drawing's source entities.

7. Choose OK.

Placing Blocks

A drawing can have a Block or drawing file inserted into it.

Block insertion:

1. Press Insert > Block (or type Insert Block).

2. Choose a Block under Name in the dialogue box. To locate an external drawing, click Browse.

3. Enter coordinate values for X, Y, and Z under Position, or choose Specify later to define the screen's insertion point after the dialogue box closes.

4. Enter the scale factor for each axis under Scale: X, Y, and Z.

- or -

To specify the Block size during insertion, click Specify later. When choosing a corner, provide the opposite corner of the rectangle where the block will fit.

- or -

Choose a scale factor for X and then click Apply uniform scale. With a scale factor of 1, the block is inserted at its original size.

Less than 1: The size is decreased to the proportion of the original size that the factor specifies.

More than 1: The size is increased.

5. To set the rotation angle in the graphics area during insertion, choose Specify later or enter a value for Angle under Rotate. Indicate a positive number for rotation going anticlockwise and a negative value for rotation going clockwise.

6. You are not able to alter the Units or Scale under Block Unit System. The drawing units are different from the block units if Scale is not equal to 1.0.

  • To split a block into its individual entities, choose Explode Block. Exploding a Block changes its properties.

7. Click ok.







Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA