Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
OpenPlant | AutoPLANT
  • Product Communities
OpenPlant | AutoPLANT
OpenPlant | AutoPLANT Wiki How to add Additional Field to Component Data in Access and SQL, and to make it an editable data field in Piping.
    • Sign In
    • -OpenPlant | AutoPLANT Wiki
      • +OpenPlant
      • -Bentley AutoPLANT
        • AutoPLANT Product Group Compatibility
        • +AutoPLANT Modeler CONNECT Edition
        • -AutoPLANT Modeler V8i
          • +AutoPLANT Modeler [FAQ]
          • +Component - AutoPLANT Modeler
          • +Customization - AutoPLANT Modeler
          • -Database - AutoPLANT Modeler
            • How to add Additional Field to Component Data in Access and SQL, and to make it an editable data field in Piping.
            • How to Check Oracle Database Provider Connection String for AutoPLANT Project Creation
            • How to Create a new SQL Database and Synchronize AutoPLANT Project to it
            • Setting up Oracle 11g R2 database client for AutoPLANT
          • +Errors, Logs, Messages, Crashes - AutoPLANT Modeler
          • +General - AutoPLANT Modeler
          • +Installation - AutoPLANT Modeler
          • Processing - AutoPLANT Modeler
          • +Settings/Attributes - AutoPLANT Modeler
          • +Tools - AutoPLANT Modeler
        • +AutoPLANT Piping
        • +AutoPLANT Equipment
        • +AutoPLANT I&W
        • +AutoPLANT P&ID
        • +AutoPLANT Isometrics
        • +AutoPLANT AutoISOGEN
        • +Bentley Data Manager
        • +Vision/Document Manager
        • +Drawing Flattener
        • +DataSheets
        • +Specification Generator
        • +ProjectWise Integration
      • +Bentley Navigator
      • +Bentley PlantSpace
      • +Plant Project Tools
      • +Bentley Raceway and Cable Management
      • i-model Composition Service for S3D
      • Working from home with OpenPlant
      • Working from home with Bentley Raceway and Cable Management
      • Working from home with AutoPLANT Modeler
      • Your Feedback is important to us!

     
     Questions about this article, topic, or product? Click here. 

    How to add Additional Field to Component Data in Access and SQL, and to make it an editable data field in Piping.

    Applies To
    Product(s): AutoPLANT V8i
    Version(s):
    Environment: N/A
    Area: Database
    Subarea:  Access/SQL
    Original Author: Vidit Ruhela, Bentley Product Advantage Group

    Overview

    To add Additional Field to Component Data, and to make it an editable data field in Piping.

    Background

    Add the Data to the Catalog

    The first step to adding component data, is to add the data to the component.  There are several available fields in the catalogs that can be used for a piece of user defined data.  (i.e. Alt_P_Mark, User 1, User 2, User 3), User may also create a new field.  As always, data must be entered manually into the Catalog Databases. 
    ***In cases where the chosen data is simply a series or other form which Microsoft Office can calculate, the data may be created in Excel and then copied over to the Catalog MDB in Access as a shortcut***
    Note: Ensure all the above-mentioned steps should be done under the supervision of some Database Admin/Specialist.

    Steps to Accomplish

    Add the new field to the Piping Table for Access Server.

    Although all Catalog Data is generally stored in the GData of each component, only valid fields from the Piping Table are included in Component Data for BOM.  Once the data field is part of component data then user simply need to add the field exactly as it appears in the catalog to the Piping Table.  This can be done in Project Administrator by following the steps below:

    1. Launch Project Administrator.
    2. As per the mentioned steps in the below screenshot edit the PROJDATA table.



    3. Scroll Down to the Piping Table, highlight it and Press the Edit button.



    4. Select Table Design.



    5. Add required field to the Table.  The field Properties from most descriptive data can be set to match the Piece Mark field properties.



    6. Save and Close the Piping Table Design Session.

    Add the new field to the Piping Table for SQL SERVER. New field can be added by two methods.

    1st Method

    1. Before editing any table make sure to uncheck the Prevent saving changes from options as per below screenshot.


      once unchecked, the changes made can be saved.

    2. Open Microsoft SQL Server Management Studio open the required Database to add the new field in the selected Table. (The below mentioned screenshot show the required changes to be carried in the test1 Database)



    3. Expand the Tables field and scroll down to the PIPING Table right click on PIPING Table and select Design as mentioned in the below screenshot.



    4. Put the Column name as shown in step 1 and Data type in step 2 as per user requirement.



    5. Check in the Piping Data field and found that new Test field is added in the component data.



      Steps to delete any field

    6. Open the required field by following the above-mentioned steps 2 & 3.
    7. Right click on the field and below dropdown window for more editing options.

    2nd Method

    To create the new queries in SQL Server Management Studio kindly refer the below steps to add and modify the queries.

    1. Open SQL Server Management Tool.
    2. Click on New Query as mentioned in the below screenshot.




    3. Run the query “ALTER TABLE PIPING ADD TEST1 varchar(15);” in the query tab to add a new column in the piping table and click Execute. Please find the below screenshot for your reference.


      once the above mentioned query is executed the new column is added in the Piping Table as mentioned below.



      Deleting a column (TEST1) from the Piping table.

    4. Open SQL Server Management Tool.
    5. Click on New Query as mentioned in the below screenshot.



    6. Run the query “ALTER TABLE PIPING DROP COLUMN TEST1;” in the query tab to delete TEST1 column from the piping table and click Execute. Please find the below screenshot for your reference.


      ones the above mentioned query is executed the new column is deleted from the Piping Table as mentioned below.


       

    Updating Previously Created Components

    Although all components created from this point forward will automatically be populated with the new data, previously created components will need to be updated.  Running the command Piping>Database Tools>Update From Spec should take care of the update.

    See Also

    Adding A New Descriptive Field To Updateable Component Data
    Applies To Product(s): AutoPLANT V8i Version(s): 08.11.05.36 Environment: N/A Area: N/A Subarea: N/A Original Author…
    Last edited over 5 years ago in OpenPlant | AutoPLANT > OpenPlant | AutoPLANT Wiki

    Comments or Corrections?

    Bentley's Product Advantage Group requests that you please confine any comments you have on this Wiki entry to this "Comments or Corrections?" section. THANK YOU!

    • New Datafield
    • AutoPLANT
    • MS-ACCESS
    • SQL
    • Database
    • Share
    • History
    • More
    • Cancel
    • Vidit Ruhela Created by Vidit Ruhela
    • When: Mon, Jul 31 2017 5:40 AM
    • Kestutis Mitkus Last revision by Bentley Colleague Kestutis Mitkus
    • When: Mon, Jul 31 2017 8:27 AM
    • Revisions: 4
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies