Object attributes data source

An object attributes data source retrieves data from a database and displays it as either object attributes or Smart Point attributes. From the user's perspective, these attributes are just like any other attributes stored in the 3D model, only their values can change dynamically according to data in the external database.

Creating an object attributes data source

Create an object attributes data source to enable 3D objects to retrieve attribute values from an external database.

Prerequisites

  • To create a data source for Smart Points, the required Smart Point Type has been created as described in Creating a Smart Point type.

Do the following:

  1. Follow the instructions in Creating a database adapter data source to create a new data source of type Object Attributes Data Source.

  2. In the Data Source section, specify the following settings:

    • Name – Enter a name for the data source.

    • Description (optional) – Enter a description for the data source.

    • State – Specify whether the data source is disabled or enabled (default).

  3. In the Groups allowed to see the data section, select user groups that should be allowed to see the data that this data source provides.

    • If no groups are selected, only administrators will see the data.

    • Add user groups with Add.

    • Remove user groups with the remove button.

    • If the All Users group is selected, other group selections will be ignored.

  4. The Adapter Configuration section is read-only.

  5. In the Data Source Configuration section, specify the following settings:

    • Provide data for – Select whether to retrieve the data to objects or Smart Points.

      • Model Objects – the retrieved data will be added to objects that have a specific attribute.

      • Smart Points – the retrieved data will be added to Smart Points of the specified type.

    • Parameter Set – Enter the attributes for which the data source is to provide data. There can be multiple attributes in a parameter set, and multiple parameter sets. To add another parameter set, click Add Alternative Parameter Set. This option is visible if you set Provide data for to Model Objects.

    • Smart Point type served – Select the appropriate Smart Point from the list. This option is visible if you set Provide data for to Smart Points.

    • Query Builder – If the selected database type is Microsoft SQL Server, you can select to use Query Builder. Set to Enabled to use a simple UI to build the query. If you are using the query builder, select the following:

    • SQL Query – Enter the SQL query to use to retrieve data. If you are using query builder, the SQL query is created based on the selections.

    • Test Key – There will be multiple fields, if multiple parameter keys are used in the query.

  6. Click Execute Query to test the configuration.

  7. In Displayed Attributes you can categorize the attributes, or rename the columns in Display Name field.

    • If the type of the attribute is Value (String), you can select it to be output as a hyperlink by changing the type as Hyperlink from the drop-down list in Type. The visible hyperlink text is set in Display Name field.

      • If set as Hyperlink, select how the hyperlink should open:

        • Always in a new tab – Each hyperlink opens a new tab (or browser window).

        • In the data source's own tab – All hyperlinks of this data source use the same tab.

        • In the named tab – All hyperlinks of this data source, as well as of any other hyperlink data source that is configured to use the same tab name, use a named tab. (Specify the tab name to use.)

          To target the current tab, name the tab as "_self".

  8. Set Allow Search Queries to Enabled if the data source can be used in search queries.

    If search queries are enabled, define Maximum Number of Data Source Queries, which determines the number of queries the data source can be included in. The field can be left empty for no limit. The default is 250.

  9. Click Save.

Selecting attributes

When a user working with a project chooses to see the details of an object in the 3D model, CADMATIC eShare looks up the attributes the object has and makes data queries for those attributes. If a data source has any of these attributes in Parameter Set configuration, then the data source is queried with the values of the attributes from the model object, and the results are shown to the user.

Example: The model contains an object with the attribute Valve Position ID having a value of 12345. A data source has Parameter Set set to Valve Position ID. When the user asks for details of the object, the data source will perform its query with a key value of 12345 and returns attributes if the database contains data for this key.

Multiple parameter sets are useful if there are several attributes that identify items of the same general kind. For example, you might want to use the same data source for equipment and valves if the external database has information for both.

Attributes and searching

When users search for objects using ids, CADMATIC eShare will not only look into the internal model but also asks from all Object Attributes data sources if they provide data for this id. In case a data source returns attributes, it is concluded that this id exists in an external system and will be shown in search results. The user is then able to navigate to the object and see data provided by the data source.

Data sources that serve multiple attribute sets will return multiple external references – one for each attribute set. So, if a data source serves for example a set containing Equipment Position Id (nam), another set containing Valve Position Id (vpo), and a third set containing Instrument Position Id (ipo), and the user performs a search for some value (such as P100) that the given data source provides data for, all three attributes will appear as external references in the search results. To avoid this, create more specific data sources that serve data for single attributes. In the example above, create three separate data sources, one for each of Equipment Position Id, Valve Position Id, and Instrument Position Id, with more specific data queries that take into account the type of the searched data.

It is possible to create a data source that provides data for an attribute that is not the id of an object. For example, objects may have an item code that acts as a reference to a warehouse inventory system and can be used to query information from the inventory database. The attribute is considered to be an id of an external object, in this case the material. When users search for ids with an item code, CADMATIC eShare shows a reference to the material as if it was an object.