To Configure a Database Link

To configure a database link

  1. To configure a file-based database link:
    1. Click Home tab Project panel File Options .
    2. In the File Options dialog box, DataTools tab, click the link you want to configure in the DataTools Links area, and click the Edit button.
      Note: If you haven't added any links yet, click the New button, and follow the procedure for adding database links first.
  2. To configure a global database link:
    1. Click Home tab Tools panel DataTools .
    2. In the DataTools dialog box, click the link you want to configure in the DataTools Links area, and click the Edit button.
      Note: If you haven't added any links yet, click the New button, and follow the procedure for adding database links first.
  3. Configure the ODBC Driver:
    1. In the Edit Link dialog box, select the appropriate ODBC Driver to define the type of the database to link to, for example Microsoft Access Driver (*.mdb).
    2. Click the Setup button. The driver wizard opens, and guides you through the setup options. If you have difficulties setting up your connection details, contact your database administrator. When you finish, the box underneath will show the connection string. This string can be modified, if necessary.

      For example, if you want to select a database with a certain name (say, test.mdb) that is always next to the model file (as in the resultant NWD/NWF not the original), type in: DBQ=%pushpath(%poppath(%currentpath),"test.mdb"); DRIVER={Microsoft Access Driver (*.mdb)};

      If you want to select a database with the same name as the original model file (say, AutoPlant), type in: DBQ=%join(%removeext(%removepath(%sourcepath)),".mdb"); DRIVER={Microsoft Access Driver (*.mdb)};

  4. Select the Hold Open for Application Lifetime check box, if you want to keep the database link open until you exit Autodesk Navisworks.
  5. Specify which table in the database to query:

    In the SQL String field, click after SELECT, and enter the selection statement, for example: SELECT * FROM tblBoilerData WHERE "NWUniqueID" = %prop("Entity Handle", "Value");

    This statement instructs Autodesk Navisworks to select all columns from the tblBoilerData table, whilst requiring that the column called NWUniqueID matches a category/property pair called Entity Handle/Value.

  6. Select which columns you want to display as link categories on the Properties window:
    1. Double-click the Fields Name field, and type the exact name of the database column, for example: “Part-time”.
    2. Press ENTER.

      The Display Name is automatically completed for you, but you can click it, and enter a different name, if you want. The text entered here is the category name shown on the link tab of the Properties window.

    3. Repeat the above process to list all required categories in the Fields area of the dialog box.
  7. Click OK.
Attention: The model is not linked to the external data source until you have activated the database link.