Applies To Product(s): OpenPlant Isometrics Manager Version(s): 08.11.09.XXX Environment: Windows 7 64 bit Area: Settings/Attributes Subarea: Original Author: Abhijit Bute, Bentley Technical Support Group Background In general, the majority of data for Isogen output is gathered from the Piping table. However, situations can arise where data from other tables in the Project Database could be valuable for placement on Iso's. The following illustrated steps demonstrate how to pull a field from the Process table into Isometric backing sheet Steps To Accomplish Add Configuration Files In workspace for isometrics does not include the query and grid functionality. It can be added by adding 2 configuration files. Copy attached gridlines.txt and textnodes.txt and paste it in style configuration directory. Ex. \Bentley\Plant V8i\Bentley PlantV8i Projects\SAMPLE_IMPERIAL\Config\OpenPlant\Isometrics\Styles\IFC\ Config Please find the query file below to be pasted in style configuration directory: (Please visit the site to view this file) Create New Drawing Attributes And Define Query To get database attribute in ‘Drawing Tag ’dialog ,user need to add query, project database location in textnode.txt file,While creating an isometric AP adds a few standard drawing attributes. Currently these are: FILENAME ISO-L1000.r017 STYLE IFC DATE 3-3-2014 TIME 11:45:28 PRJ_NAME ROTAT1 SIZE1 150 SIZE2 0 SPECMAIN MCS150 LINENUMBER L1000 UNIT U SERVICE S NAME ISO-L1000 ALIAS ISO-L1000 ACTIVE True Marked LINENUMBER in yellow , as this attribute will be used in the examples to query the database. A. For MSACCESS 32 bit following query should add in textnode.txt. mydsn=Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq= C:\ProgramData\Bentley\Plant V8i\Bentley Plant V8i Projects\SAMPLE_METRIC\Projdata; 00_keytag = DBQUERY ($(mydsn), select keytag from TAG_REG where tag_no='$(LINENUMBER)') Note: The above project path shown is an example. User need to set their own path as per their project. The DBQUERY above gets the value of the KEYTAG column in the TAG_REG table from the row where the TAG_NO column equals the value contained in LINENUMBER drawing attribute. The resulting value is stored in a new drawing attribute named 00_KEYTAG. Please note that $(attrname) is expanded to the value of the drawing attribute attrname. LINENUMBER is a drawing attribute that was already added by the AP interface to OPIM Similarly we can define query for other attributes like popp_nom, popt_nom, FLUID_FILL as described below. 00_popp_nom = DBQUERY($(mydsn), select popp_nom from process where keytag='$(00_keytag)') 00_popt_nom = DBQUERY($(mydsn), select popt_nom from process where keytag='$(00_keytag)') 00_FLUID_FILL = DBQUERY($(mydsn), select FLUID_FILLING_FACTOR from process where keytag= '$ 00_keytag)') Refer below image for edit textnodes.txt file. B. For MSACCESS 64 bit following query should add in textnode.txt. mydsn=Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\ProgramData\Bentley\Plant V8i\Bentley Plant V8i Projects\SAMPLE_METRIC\Projdata\projdata.mdb; 00_keytag = DBQUERY ($(mydsn), select keytag from TAG_REG where tag_no='$(LINENUMBER)') 00_popp_nom = DBQUERY($(mydsn), select popp_nom from process where keytag='$(00_keytag)') 00_popt_nom = DBQUERY($(mydsn), select popt_nom from process where keytag='$(00_keytag)') 00_FLUID_FILL = DBQUERY($(mydsn), select FLUID_FILLING_FACTOR from process where keytag='$ (00_keytag)') C. For SQL database following query should be added in textnode.txt. mydsn=Driver={SQL Server};Server=SQL Server name;Database=sql databse name; Uid=user id;Pwd=password; 00_keytag = DBQUERY ($(mydsn), select keytag from TAG_REG where tag_no='$(LINENUMBER)') 00_popp_nom = DBQUERY($(mydsn), select popp_nom from process where keytag='$(00_keytag)') 00_popt_nom = DBQUERY($(mydsn), select popt_nom from process where keytag='$(00_keytag)') 00_FLUID_FILL = DBQUERY($(mydsn), select FLUID_FILLING_FACTOR from process where keytag='$ (00_keytag)') The isometric result can be viewed using the Show Tag Data tool (first 4 lines) Display Drawing Attributes Below are the steps to get the attributes displayed in backing sheet. To get attributes in backing sheet we have to add draw ing attributes in Node2da.txt file. See new attributes added in yellow marked below. 36, checked 63,UNIT_NAME 64,STYLE 1001,00_KEYTAG 1002,00_POPP_NOM Open seed file and go to Isoextractor>text node editor. Text node editor will show newly added attribute. Right click on text node number and click on place text node and place text node on desired location. Save the seed file. Generate isometric to verify the result. See Also DB query for Multimode Project Environment. http://communities.bentley.com/products/plant/design___engineering/w/plant_design_and_engineering__wiki/17953.db-query-for-multimode-project-environment Comments or Corrections?
↧