Applies To | OpenPlant Isometrics Manager |
Product(s): | OpenPlant Isometrics Manager |
Version(s): | SS5, SS6 |
Environment: | Windows 7/8.1/10 (64 bit) |
Area: | Installation |
Subarea: | |
Original Author: | Bentley Product Advantage Group |
How to get the model name (filename) from AutoPlant into the iso using OPIM?
1 | # If an Access based project is used: (as example) mydsn=Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\ProgramData\Bentley\Plant V8i\Bentley Plant V8i Projects\SAMPLE_METRIC\Projdata\Projdata.mdb; OR # If a SQL project is used with Windows Authentfication, mydsn=Driver={SQL Server};Server=SQL Server name;Database=sql databse name; |
2 | # If a user id and password option is used add also the following: Uid=userid;Pwd=password; |
3 | # This is the query to get the KEYTAG from the project database using LINENUMBER 00_keytag = DBQUERY ($(mydsn), select keytag from TAG_REG where tag_no='$(LINENUMBER)') |
4 | # this makes a drawing attribute compID that gets the most common value of the component attribute GUID compId = *(GUID) |
5 | # This is the query to get the modelname from the project database using compID 00_PipingModel = DBQUERY ($(mydsn), SELECT D.DOC_NAME FROM DOC_REG AS D INNER JOIN RELATIONSHIPINSTANCE AS R1 ON R1.ID1 = D.DOC_ID WHERE R1.ID2='$(compID)' AND R1.RELATIONSHIPTYPE = 3) |
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!