Hide Table of Contents

-EditBlockAttribute

Use the -EditBlockAttribute command to edit the values and text options of the same variable attributes in multiple Block instances.

To modify BlockAttribute properties such as Layer and TextStyle, use the EditXBlockAttribute command.

It is the command window variant of the EditBlockAttribute command.

You can replace all or only a part of an attribute value on all Blocks or only on a selection. Additionally, you can change the position, height, angle and style, but only individually.

To specify BlockAttributes based on their names and values, use the asterisk (*) to filter them. A window selection returns all attributes that have the specified value and contain the specified string within their name.

You can:

Note: You cannot edit BlockAttribute values on locked Layers.

To edit BlockAttributes one at a time:

When replacing BlockAttributes one at a time, you can edit all attributes or only some of them. Additionally, you can change the position, height, angle and style.

Note: BlockAttributes must be visible and parallel to the CCS.

  1. Type -EditBlockAttribute at the command prompt.
  2. Type Yes and press Enter to specify that you want to edit BlockAttributes one by one.
  3. Specify the name of the Blocks and press Enter.

    You can specify several blocks: Type a search string using * for a string of characters to select Blocks. For example, type "A*" to select all Blocks starting with A in the name.

  4. Specify the name of the BlockAttribute and press Enter.

    You can specify several BlockAttributes: Type a search string using * for a string of characters to select BlockAttributes. For example, type "A*" to select all BlockAttributes starting with A in the name.

  5. Specify the value of the BlockAttribute and press Enter.

      BlockAttribute values are case-sensitive.

  6. In the graphics area, specify the Blocks for which you want to edit the attribute values and press Enter.

    In the graphics area, the BlockAttributes that match the specified criteria, are selected. The editing starts with the first BlockAttribute from the selection. Step through the BlockAttributes using the Next attribute option.

  7. Optionally, change the properties of the current BlockAttribute.

    To change or replace a BlockAttribute value:

    1. Specify the Value option and press Enter.
    2. Specify one of the following options:
      • Change: Replaces a specified substring of the BlockAttribute value.
      • Replace: Replaces the entire value of the BlockAttribute with a new value.

    To change the text position properties, use the following options:

    • Insertion point. Lets you specify a new BlockAttribute insertion point.

        Note: Assuming that a BlockAttribute is not defined as locked in Block, you can modify the insertion point of a BlockAttribute by selecting its EntityGrip and drag it to a new location.

    • Layer. Lets you place the BlockAttribute on another layer.
    • Text rotation. Changes the rotation angle.

    To change the text aspect, use the following options:

    • Height. Changes the text height.
    • Textstyle. Lets you specify a new text style.
    • Linecolor. Changes the text color. You can enter ByLayer or ByBlock or a true color (RGB value). To specify a true color, type three integer values from 0 to 255 separated by commas for the red, green, and blue values, for example, 127,0,127.
  8. After modifying the properties of a BlockAttribute, specify the Next attribute option to proceed to the next attribute to modify.
  9. Repeat steps 8 and 9 as needed. If there are no more selected BlockAttributes, the command ends.

To edit several BlockAttributes:

According to your choice, applies only to visible attributes or both visible and invisible.

You can replace a text string with another text string, for all attributes.

  1. Type -EditBlockAtttribute at the command prompt.
  2. Type No to edit more than one BlockAttribute.
  3. To specify whether you want to edit BlockAttributes that are currently visible, type Yes or No.
  4. Specify the name of the Blocks and press Enter.

    You can specify several Blocks: Type a search string using * for a string of characters to select Blocks. For example, type "A*" to select all Blocks starting with A in the name.

  5. Specify the name of the BlockAttribute and press Enter.
  6. Specify the BlockAttribute value and press Enter.

    BlockAttribute values are case-sensitive.

  7. In the graphics area, select the Blocks for which you want to edit the BlockAttribute values.
  8. Press Enter.
  9. Type the string that you want to replace and press Enter.
  10. Type the string that will replace the specified string and press Enter.

Example:

The following blocks have one common BlockAttribute named Section, displaying the detail number.

Old values: AB1, AB2, AB3

New values: CD1, CD2, CD3

Use A* to specify all Section attributes for which it is necessary to modify the value.

Include a set of blocks in a window selection.

The window selection returns 5.

The value will be replaced in all 5 block attributes.

Access

Command: -EditBlockAttribute



Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   Command -EditBlockAttribute
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:




x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: 2023 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.