2D Component Text Must Match Sheet Property

This check verifies the content of a text with the Modifiable in instance attribute in 2D components.

This page discusses:

Context

In a layout sheet, you can instantiate an external 2D component that contains text. This text has a unique name and a Modifiable in Instance attribute. You can edit it individually without losing the link to the catalog.

Editable Text Elements in a 2D Component Instance

Use this check to verify the following rules:

  • The content of the text fully or partially matches the sheet name or the sheet format name.
  • The content of the text matches a fixed character string or a regular expression. Text elements with an incorrect content appear as incorrect.

Recommendation: If more than one 2D component include the specified text element, specify an additional text element that only exists in the 2D component to verify.

Check Information

Check Details Description
Applicable to: DrwSheet
Automatic Solution:
Check Parameters:
  • Std2DCompTextMatchSheetName_CheckTextValuesInTexts: String type.

    Specifies the list of text elements to compare with regular expressions.

  • Std2DCompTextMatchSheetName_CheckTextValuesHealing: String type.

    Specifies the replacement value that the healing function is to use.

    For the healing to work correctly, the number of items from this list must match the text elements listed in the Std2DCompTextMatchSheetName_CheckTextValuesInTexts parameter.

    If the text content does not match the corresponding specified value, during the healing, the incorrect text is replaced by the text specified in this parameter.

  • Std2DCompTextMatchSheetName_CheckTextValues: String type.

    Specifies a regular expression corresponding to the required content of the text elements.

    The number of items from this list must match the ones listed in the Std2DCompTextMatchSheetName_CheckTextValuesInTexts parameter.

  • Std2DCompTextMatchSheetName_CaptureTextValues: String type.

    Specifies a regular expression correspondint to the required content of the text elements.

    Replace the substring that matches the sheet property by \1 as the back reference placeholder. If the text content does not match strings in this list, during healing, the text is fully replaced with the string specified in this column.

    The number of items from this list must match the ones listed in the Std2DCompTextMatchSheetName_CaptureTextPropertyExpressions parameter.

    For example, if a sheet must contain a 2D component with a text element that includes the number from the end of the sheet name, then specify the following values for the parameters:

    • Std2DCompTextMatchSheetName_PropertyToCompare: SheetName
    • Std2DCompTextMatchSheetName_CaptureTextPropertyExpressions: nth item = ".*[0-9]*" (for Sheet.12, this expression extracts "12")
    • Std2DCompTextMatchSheetName_CaptureTextInTexts: nth item = "Text.3" (Text.3 should contain the number of the sheet name.)
    • Std2DCompTextMatchSheetName_CaptureTextValues: nth item = ".*\1" (If Text.3 has the string "Sheet Index = 12", the check succeeds. If Text.3 include the string "Sheet Index = 7", the check fails.)

  • Std2DCompTextMatchSheetName_PropertyToCompare: String type.

    Specifies the sheet property to compare. Enter either SheetName or SheetFormat as the value..

    Note: By default, the value is SheetName.
  • Std2DCompTextMatchSheetName_MustContainTextElements: String type.

    Specifies the names of the text elements that must exist in the 2D component.

    You can use regular expressions.

    Important: This field must not be empty.

  • Std2DCompTextMatchSheetName_Required2DComponentsMax: Integer type.

    Specifies the allowed maximum number of 2D components in the specified views that contain the required text elements.

    Note: By default, the value is 10, and the minimum value is 1.

  • Std2DCompTextMatchSheetName_Required2DComponentsMin: Integer type.

    Specifies the allowed minimum number of 2D components in the specified views that contain the required text elements.

    Note: By default, the value is 1, and the minimum value is 1.

  • Std2DCompTextMatchSheetName_CaptureTextInTexts: String type.

    Specifies the name of the text element to verify.

    If no text element includes the specified name, this comparison is ignored.

    You can use regular expressions.

    The number of items from this list must match with the ones listed in the Std2DCompTextMatchSheetName_CaptureTextPropertyExpressions parameter.

  • Std2DCompTextMatchSheetName_CaptureTextPropertyExpressions: String type.

    Specifies the sheet property to compare. Use a regular expression.

  • Std2DCompTextMatchSheetName_SheetName: String type.

    Specifies the names of the sheets that contain 2D components with text elements to verify.

    You can use regular expressions.

    Important: This field must not be empty.

  • Std2DCompTextMatchSheetName_ViewName: String type.

    Specifies the names of the views that contain the 2D components to verify.

    You can use regular expressions.

    Important: This field must not be empty.

  • Std2DCompTextMatchSheetName_OnlyOneMustContainTextElement: String type.

    Specifies the name of a text element that exists only in the 2D component that contains the text elements to verify.

    This parameter is required if the number of allowed 2D components is greater than 1. If not, you can leave this field empty.

    An error appears if the named text element exists in more than one 2D component or in no 2D component matching the specifications.

Check Failure Resolution

If the check fails, replace the incorrect text.

Tip: You can make text elements editable in 2D component instances. To do so, on the detail sheet, right-click the reference text element of the 2D component, and select Modifiable in instance.