You are currently reviewing an older revision of this page.
This Client Server article is republished in its entirety from 2003 for reference purposes.
Often, you may have an element with a database linkage and you would like to display part or all of that attribute data as text in the design file. This can be done using the Displayable Attributes functionality in MicroStation. An SQL statement that you set up in your database will determine what attribute information from the element will be displayed. Here are a couple steps to set up your database to use Displayable Attributes.
*Note: The data used in this article comes from the example "gis.mdb," which is in the Microsoft Access database that is delivered with MicroStation. This is located in the following directory:
Displayable Attributes will also work with Oracle and OLE databases. Because a database connection is required, and in our example we are using ODBC, additional information on setting up an ODBC datasource can be found in the following TechNote: http://selectservices.bentley.com/technotes/technotes/8167.htm
You will need to setup your database following the steps below in order to use Displayable Attributes.
First, you need to create a Displayable Attributes table in your database. This table may be given any SQL-compliant name. Typically the name of the attribute table is included. In this case, we will create displayable attributes for the parcel table, so we will name the table parcel_das (see Figure 1). This table defines the relationship between the unique ID used by the tool, the attribute table to be used and the SQL statements used to retrieve your attributes.
In this table you will need two columns. The first column in this table is one that will be populated with integers, titled "dastype." This column stores the unique ID value used to identify which SQL statement will be run when using the Displayable Attributes tool.
Second, you need to create an "sqldas" column. In this column, you will create a SQL statement that defines the attributes you wish to retrieve and display. (Example: If you wish to display the owner name and parcel value, the following select statement would be Select owner, parcel_value from parcel(See Figure 2).
The next step is to create a relationship between the Database Attribute table and the DAS table. This is done by locating the table in the mscatalog and entering the name of the DAS table in the dastable column of the mscatalog. In this case, enter parcel_das into the dastable column for the parcel table (see Figure 3).
Your database setup is now complete. Open the design file in which you want to use Displayable Attributes. In the DGN file you must create an element and link it to a database record in the parcel table. Once a database record is attached to the element, your next step is to place a text node in the location where you want the displayable attributes to be located.
*Note: Make sure you make text nodes visible within your design file. This is done per view via Settings > View Attributes > Text Nodes.
Once you have placed a text node you will need to define it as a Displayable Attribute text node and to tell MicroStation which element's attributes to display there. To do this, choose your "Attach Displayable Attributes" tool from the database tool bar (see Figure 4).
This will open the Attach Displayable Attributes tool settings dialog box (see Figure 5).
The setting "DA Type" refers to the unique identifier in the "dastype" column of the Displayable Attributes table. Enter the DA Type number that corresponds to the SQL statement you wish to run. By default, a DA Type of 1 is always selected.
Now that "Attach Displayable Attributes" is selected, you will notice that in your status bar you are prompted to "select element to provide linkage." Select the element with a database linkage and accept, then select the text node you want to annotate and accept. Now the text node has a DAS database linkage associated with it. This is a permanent association and will not have to be re-linked unless the DA Type changes or the text node is deleted.
Now that the text node is linked to the database record, we need to tell MicroStation to display attributes. To do this, select the "Load Displayable Attributes" tool from the database toolbar (see Figure 6).
Once identified, accept it and your displayable attributes will display in the design file at that text node.
*Note: If changes are made to the database in the future, and you would like to refresh the data in the design file, you can simply fence the file, reload the DAS by using the Load Displayable Attributes tool (use Fence toggle), and the text will update accordingly.
For additional information regarding displayable attributes and workflow, the database tutorial is also available on docs.bentley.com. The link is called MicroStation/J Database Interface Tutorial, and is located under Foundation products.
Client Server Archive
MicroStation Desktop TechNotes and FAQs