How to Get Updated Revision in Isometrics Drawing Using DBQuery in OpenPlant Isometric Manager CONNE



Applies To 
Product(s):OpenPlant Isometrics Manager
Version(s):

Connect Edition Update 8 (10.08.00.51)

Environment: Windows 10 (64-bit)
Area: Customization
Subarea: N/A
Original Author:Ashutosh Patil, Bentley Product Advantage Group

Background

In OpenPlant Isometrics Manager, Isometrics output drawing title block contains revision field but it does not get updated. Below steps will aid user to update the Revision using DB Query inside Textnode.txt file present under style folder. As a prerequisite, user should be aware of SQL or Access and able to create new file and must be knowing version compatibility and relevant terms like creating table and assigning datatype etc. Below steps explained using 64 bit ODBC drivers. 


Steps to Accomplish

  1. Create just a new mdb file, say TESTISORev.mdb (don’t enter any fields in it) & place it in any Isometric style folder,
    See below path to store it.Considering IFC: C:\ProgramData\Bentley\OpenPlant CONNECTEdition\Configuration\WorkSpaces\WorkSpace\WorkSets\OpenPlantMetric\Standards\OpenPlant\Isometrics\styles\IFC\config



    It can be Stored any where to get read.
      
  2. Launch the textnodes.txt from IFC style config folder.



    Std Path: C:\ProgramData\Bentley\OpenPlant CONNECT Edition\Configuration\Workspaces\WorkSpace\WorkSets\OpenPlantMetric\Standards\OpenPlant\Isometrics\styles\IFC\config
      
  3. In textnodes.txt write db query as given below:
    Query:

    myDSN=Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=C:\ProgramData\Bentley\OpenPlant CONNECT Edition\Configuration\Workspaces\WorkSpace\WorkSets\OpenPlantMetric\Standards\OpenPlant\Isometrics\styles\IFC\config\TESTISORev.mdb

     

    # this creates a table in the database and puts a unique index on the filename field

    @a0 = DBQUERY ($(myDsn), Create Table iso_revisions (filename varchar(255), revision int))

    @a1 = DBQUERY ($(myDsn), Create UNIQUE index index1 on iso_revisions (filename))

     

    # This inserts a row for the filename if not yet there and initializes the revision to 1

    @a2 = DBQUERY ($(myDsn), Insert into iso_revisions (filename, revision) VALUES ('$(NAME)', 1))

     

    # this gets the current revision number for the table

    @Rev = DBQUERY ($(myDsn), Select revision from iso_revisions where filename = '$(NAME)')

     

    # this increments the revision table number (for the next time)

    @a3 = DBQUERY ($(myDsn), Update iso_revisions set revision = $(rev)+1 where filename = '$(NAME)')

     

    REV_MAIN=$(Rev)
     

    Make sure the space between .mdb and .accedb is verified if the output is not perfect after generating the isometric.Save and Close the file.

  4. Go to Pipeline manager in Openplant Modeler where pipeline was placed and regenerate the isometric select correct style i.e IFC where files has been stored to get the changes reflected in isometric.
     

      
  5. TESTISORev.mdb gets updated as per query with addition one revision value instead of one its get reflected as 2 due to below mentioned in step 3 i.e $(rev)+1

    # this increments the revision table number (for the next time)
    @a3 = DBQUERY ($(myDsn), Update iso_revisions set revision = $(rev)+1 where filename = '$(NAME)')
      


  6. Similary try to regenerate the isometric again and Rev number gets updated as shown below



  7. When click on Drawing Components the REV_MAIN can be seen with how many time the isometric getting generated.Below the Isometric is generated 3rd time.


    Thus Isometric generation can be tracked down through revision no easily.

     

See Also

communities.bentley.com/.../openplant-isometrics-manager-connect

Still a Problem?

If above problem still persists, then please create a Service Request and contact the Bentley Product Advantage group.  Please include a list of all relevant details to get in depth analysis for a solution or workaround