Specifying schematic feature class query and identifier using Schematics Query/Identifier Editor

Schematic diagrams contain schematic features that are created by the diagram template's builder from the input data specified at the beginning of diagram generation. But any schematic diagram, regardless of its related builder, can also contain schematic features that are built from custom queries configured on some schematic feature classes. This means that any diagram content can mix schematic features built from a builder and schematic features built from custom queries. Moreover, when using the Standard builder, diagrams may be entirely built from custom queries.

The section below describes how to determine a query and identifiers for a schematic feature class associated with a Standard builder diagram template that has been configured to generate diagrams, entirely built from custom queries, per gas plant.

NotaNota:

For more details on how such a diagram template can be configured, see the Specifying schematic diagram template query and identifier using the Schematics Query/Identifier Editor topic.

Pasos:
  1. Edit your schematic dataset within Schematic Dataset Editor.
  2. If the schematic dataset resources are not arranged in a tree view in the Schematic Items window, click Views on the Schematic Dataset Editor toolbar and click Project Tree.
  3. Click the schematic feature class entry for which you want to specify a custom query in the Dataset Editor tree.
  4. Click its Properties tab in the Dataset Editor window at the right.
  5. In the Query section, click the Evaluation Mode arrow and click Query on Generate/Update.
    • By default, schematic feature classes are created with the No Query evaluation mode—that is, no custom queries are set to build the related schematic features.
    • The Query on Start Editing evaluation mode must be set if you want the query to be dynamically reexecuted each time an editing session starts on the schematic diagram.

    Learn more about dynamic custom queries on schematic feature classes

    PrecauciónPrecaución:

    The schematic rules only operate on schematic features built by custom queries for which the evaluation mode is Query on Generate/Update. Schematic features built by custom queries with the Query on Start Editing evaluation mode are processed after the rules execution during diagram generations and updates.

    The Edit Query/Identifier button is automatically enabled.

  6. Click the Edit Query/Identifier button Edit/Query Identifier button.

    The Query/Identifier Editor dialog box opens:

    Query/Identifier Editor dialog box

  7. From the Data Source list (1), click the desired data source.

    All the data sources referenced in the schematic dataset are available in the drop-down list.

  8. From the Tables list (2), click the table on which the query is going to operate.

    The selected table's content is automatically displayed in area 3.

    NotaNota:

    Double-clicking the desired table in the Tables list automatically fills the Query area (4) with a default query that returns all the records in that table.

    Query/Identifier Editor dialog box—Query area

  9. In the Query area (4), type your query SQL code.

    In this example, since you want to filter out the elements related to a given gas plant, define a query that works with the plant_number field as a parameter:

    Query/Identifier Editor dialog box—Query area with parameter

    In the Parameters section, do the following:

    • Choose the schematic attribute that will be used to run the query from the Name drop-down list. This schematic attribute is often specified for the related diagram template.
    • Check the Is Text check box if the type of the attribute values is textual. Uncheck this check box for any other type of value.
    • In the Test Value field, specify a test value before clicking Show Results and testing the query result.

  10. Click Show Results.

    The query result is displayed in the Results section (6):

    Query/Identifier Editor dialog box—Query area with parameter

  11. From the Fields list (7), click the field that will be used to build the identifier for each schematic feature item returned by the query and use the Move Right button (8) to validate.

    The chosen field name is automatically displayed in the Identifier list (9):

    Query/Identifier Editor dialog box—identifier defined

    NotaNota:
    • Several field names can be specified to build schematic feature identifiers. In that case, each identifier is obtained by concatenating all the fields in their entry sequence order; that is, in the Identifier list order. The concatenated fields are hyphenated. To modify the field sequence, click the field you want to move to another location from the Identifier list and click either the Move Up or Move Down arrow at the right of the Identifier section until the list is ordered as desired.
    • String constants can also be configured to build schematic feature identifiers. Use the Add Identifier button at the right of the Identifier section to add such a string in your identifiers; it will be concatenated with the other specified fields.
    PrecauciónPrecaución:

    When configuring the parameters to build the schematic feature identifiers, keep in mind the following:

    • The identifier length is limited to 128 characters.
    • The identifier must be unique for each schematic feature contained in a diagram.

  12. Click OK to validate and stop the schematic feature class query definition.

    The SQL code is automatically reported in the Query area field on the schematic feature class' Properties tab.

PrecauciónPrecaución:

Parameters in the Query section can be configured and changed at any time for any schematic feature class, but this must be done only if necessary. You generally must configure the schematic feature class query if the schematic feature class is associated with a Standard builder diagram template to generate diagrams entirely built from custom queries, but configuring a query for a schematic feature class managed by any other predefined builder is necessary only when you want to generate mixed diagrams whose contents will merge schematic features built from input data specified at diagram generation and other schematic features built from those custom queries.

Temas relacionados


7/11/2012