OG10334-L Drive AutoCAD Plant 3D and AutoCAD P&ID Data Using the External Database Reference Manager Dan Scales Senior Product Support Specialist Autodesk, Inc. Learning Objectives Discover the External Database Reference Manager Learn what type of databases can be used by the External Database Manager Learn how to connect AutoCAD Plant 3D and AutoCAD P&ID projects to multiple external database sources Learn how the data from the external data sources can be used to streamline your AutoCAD Plant 3D and P&ID workflows Description Learn how to improve productivity through the use of the undocumented, yet extremely powerful, External Database Reference Manager. Using this feature you will learn how you can use your existing component data, from multiple external data sources, to drive AutoCAD Plant 3D software properties and AutoCAD P&ID software properties for creating deliverable documentation. Your AU Experts Dan Scales studied Construction at Sheffield Hallam University and Building Surveying at Heriot Watt University in Edinburgh. Joining Autodesk in 2000, Dan has provided support for a wide variety of Autodesk products and has been supporting Plant and P&ID since the very first releases. As part of this role Dan writes technical articles for the Autodesk Knowledge Network and is an author on the “In the Pipes” blog. Prior to joining Autodesk, Dan gained experience working as a design draftsman for a number of consulting engineers in and around Edinburgh.
Drive AutoCAD Plant 3D and AutoCAD P&ID Data Using the External Database Reference Manager 2 Table of Contents Discover the External Database Reference Manager 4 Launch the External Database Reference Manager 4 Data Source Tab 4 Data Link Properties Dialog 5 Property Mapping Tab 5 Existing Mapping Virtual Mapping When should an Existing or Virtual mapping be used? Learn what type of databases can be used by the External Database Manager 6 Limitations 7 Learn how to connect AutoCAD Plant 3D and AutoCAD P&ID projects to multiple external database sources 7 Enter the custom properties into the project database 7 Create a Microsoft Access Database from a Microsoft Excel Spreadsheet 8 Connect your project to an external Microsoft Access database 9 Load the External Database Data into your Project 11 Learn how the data from the external data sources can be used to streamline your AutoCAD Plant 3D and P&ID workflows 12 LDT Overview Create the LDT File 13 Map the LDT properties to the Isometric Style 13 Generate an isometric drawing that contains the mapped data 15
Drive AutoCAD Plant 3D and AutoCAD P&ID Data Using the External Database Reference Manager 3 Table of Figures Figure 1: Data Source Tab 4 Figure 2: Data Link Properties Dialog 5 Figure 3: Property Mapping Tab 5 Figure 4: Provider & Connection String 6 Figure 5: Project Setup – Add Properties 7 Figure 6: Project Setup – Custom Properties 8 Figure 7: Import Spreadsheet Wizard 8 Figure 8: Microsoft Office 12.0 Access Database Engine OlE DB Provider 9 Figure 9: Test Connection Succeeded 9 Figure 10: Map Existing Property 10 Figure 11: Existing Property Mapping Complete 11 Figure 12: Reload Mapped Properties 11 Figure 13: External Data Loaded Into Project 12 Figure 14: Export 13 Figure 15: Isometric with LDT Attributes 14 Figure 16: Setup the LDT 14 Figure 17: Map the LDT Attributes 15 Figure 18: Isometric with LDT Attributes 16
Drive AutoCAD Plant 3D and AutoCAD P&ID Data Using the External Database Reference Manager 4 Discover the External Database Reference Manager Launch the External Database Reference Manager The External Database Manager is an undocumented utility which allows Plant 3D and P&ID to connect to an external database using either an Existing Mapping or a Virtual Mapping. Start AutoCAD Plant 3D and open the PLANTXDBMANAGER project from the provided dataset Launch the External Database Reference Manager utility using the undocumented PLANTXDBMANAGER command Data Source Tab The Data Sources tab is where the external database connection is configured Click Add > Define to open the Data Link Properties dialog FIGURE 1: DATA SOURCE TAB
Drive AutoCAD Plant 3D and AutoCAD P&ID Data Using the External Database Reference Manager 5 Data Link Properties Dialog The Data Link Properties dialog is where the connection settings are configured Click close to close the Data Link Properties dialog FIGURE 2: DATA LINK PROPERTIES Property Mapping Tab Switch to the Property Mapping tab of the External Database Reference Manager dialog and click the Hide Unused button to see the available project database classes FIGURE 3: EXTERNAL DATABASE REFERENCE MANAGER – PROPERTY MAPPING
Drive AutoCAD Plant 3D and AutoCAD P&ID Data Using the External Database Reference Manager 6 At the top of the dialog switch from the Pnid tab to the Piping and the Plant 3D classes with then be displayed Note: The “Pnid”, “Piping”, “Iso”, “Ortho”, buttons at the top of the dialog specify which project database the external database will be linked with Linking to the Pnid and Piping databases are the only valid options Existing Mapping The external database data is mapped to an existing property in the project. Virtual Mapping The column in the external database table does not become a property in the project hierarchy; it will appear as a new property, and can have a name that's different from the external database column name. When should an Existing or Virtual mapping be used? The decision on whether you use an existing mapping or a virtual mapping should be driven by what you need the data to be used for. If the data will included in a report then opt for an Existing Mapping as the Virtual mappings cannot be read by the Report Creator. Learn what type of databases can be used by the External Database Manager The Data Link Properties dialog is where the connection settings are configured The project database interacts with external databases through the OLE DB .NET provider, and can connect to most database systems with an installation of the corresponding OLE DB providers on the client system Note: For this class we will be connecting to a Microsoft Access database. FIGURE 4: PROVIDER & CONNECTION STRING
Drive AutoCAD Plant 3D and AutoCAD P&ID Data Using the External Database Reference Manager 7 Limitations The External Database Reference Manager cannot connect SQLite or to Microsoft Excel. Learn how to connect AutoCAD Plant 3D and AutoCAD P&ID projects to multiple external database sources Enter the custom properties into the project database. Open the project setup. Go to: P&ID DWG Settings > Engineering Items > Lines > Pipe Line Segments FIGURE 5: PROJECT SETUP – ADD PROPERTIES Add the following 13 properties as “String” property types: P3DDesignCode P3DService P3DStressRelief P3DNDT P3DFlangeRating P3DCorrosionAllowance P3DFlangeFacing P3DPressureLimit P3DPressTempCode P3DTempLower P3DTempUpper P3DMaterial P3DPaintSpec
Drive AutoCAD Plant 3D and AutoCAD P&ID Data Using the External Database Reference Manager 8 FIGURE 6: PROJECT SETUP – CUSTOM PROPERTIES Create a Microsoft Access Database from a Microsoft Excel Spreadsheet Open Microsoft Access and double click “Blank desktop database”. Save the database as AUDATABASE.accdb to the root of C. In Access select the EXTERNAL DATA tab from the Ribbon. Click the Import Excel spreadsheet button: Browse to the Data.xlsx spreadsheet located in the class data folder and click OK Important: In the Import Spreadsheet Wizard dialog select the First Row Contains Column Headings: FIGURE 7: IMPORT SPREADSHEET WIZARD
Drive AutoCAD Plant 3D and AutoCAD P&ID Data Using the External Database Reference Manager 9 Click Finish Open the SpecDataSheet table and review the database You are now ready to connect this data to the project Connect your project to the Microsoft Access database In Plant 3D enter the PLANTXDBMANAGER command In the External Database Reference Manager click Add Enter a name for the data source (or leave as Data Source 1) and click Define In the Data Link Properties select the Provider tab Select Microsoft Office 12.0 Access Database Engine OLE DB Provider and click Next: FIGURE 8: MICROSOFT OFFICE 12.0 ACCESS DATABASE ENGINE OLE DB PROVIDER In the Connection tab enter the path to the C:\AUDATABASE.accdb Click Test Connection and confirm the connection is successful: FIGURE 9: TEST CONNECTION SUCCEEDED
Drive AutoCAD Plant 3D and AutoCAD P&ID Data Using the External Database Reference Manager 10 Click Apply to complete the connection Switch to the Property Mapping tab of the External Database Reference Manager and click the Hide Unused button Expand the Engineering Items tree and select PipeLines Click Map Existing Property FIGURE 10: MAP EXISTING PROPERTY Enter a name for the mapping - AUMAPPING Select the Referenced data source from the drop down list Select the Referenced table from the drop down list Select the Foreign/Primary key that will be used to drive the mapping: External Key Name = P3DPipeClass Existing Key Name = Spec Map the 13 custom properties created earlier to the equivalent external database properties and click Apply and Close:
Drive AutoCAD Plant 3D and AutoCAD P&ID Data Using the External Database Reference Manager 11 FIGURE 11: EXISTING PROPERTY MAPPING COMPLETE Load the External Database Data into your Project Open project drawing 1-A1-1001 from the project Manager Open the Data Manager and select P&ID Project Data Right-click Pipe Line Segments > Reload Mapped Properties > AUMAPPING FIGURE 12: RELOAD MAPPED PROPERTIES…
Drive AutoCAD Plant 3D and AutoCAD P&ID Data Using the External Database Reference Manager 12 The properties from the Access database will be written to all the pipeline segments that are set to CS300: FIGURE 13: EXTERNAL DATA LOADED INTO PROJECT These steps can be repeated for multiple external databases as required for P&ID and Plant 3D properties
Drive AutoCAD Plant 3D and AutoCAD P&ID Data Using the External Database Reference Manager 13 Learn how the data from the external data sources can be used to streamline your AutoCAD Plant 3D and P&ID workflows In this section we will look at how the external data can be loaded via a Line Designation Table (LDT) file into your isometric drawings as a deliverable document. LDT Overview An LDT allows you to create and modify information external to Plant 3D, but include the information on an isometric. Originally, line designation tables were comma delimited (.csv), but now they are Excel Spreadsheets (.xls, .xlsx). After locating the LDT file, the project setup will read the given file and allow you to locate the position of the attributes corresponding to the columns in your LDT. Then, you will choose which column includes the line number (the unique numeric value) for lookup. When the isometric is created, the file will be scanned for the current line number, and the column values for the corresponding row will be inserted into the isometric. Create the LDT File In the Data Manager select Pipe Line Segments and click the Export button: FIGURE 14: EXPORT In the Export Data dialog select the Active node only option Browse to the project Related Files folder and save the export as LDT.xls Map the LDT properties to the Isometric Style Open the Project Setup and go to Isometric DWG Settings > Title Block and Display Select Check_ANSI-C and then click Setup Title Block
Drive AutoCAD Plant 3D and AutoCAD P&ID Data Using the External Database Reference Manager 14 FIGURE 15: SETUP TITLE BLOCK FOR LDT From the Ribbon click the Title Block Attributes button In the Insert Title Block attributes dialog switch to the LDT Setup tab Select LineNumber for the Line Number Column Click View LDT to see the properties that can be imported into the isometric FIGURE 16: SETUP THE LDT Close the LDT preview and switch to the Add Attributes tab
Drive AutoCAD Plant 3D and AutoCAD P&ID Data Using the External Database Reference Manager 15 Select LDT Attributes from the Attribute category dropdown FIGURE 17: MAP THE LDT ATTRIBUTES Select each property in turn that are mapped with the External Database Reference Manger and click Place Insert each attribute into the relevant cell in the isometric title block Once all attributes have been placed click Close Block Editor saving the changes From the Ribbon click Return to Project Setup saving the changes Click Apply then OK to exit the Project Setup Generate an isometric drawing that contains the mapped data Open drawing 1-PE-001 via the Project Manager Switch to the Iso tab and click Production Iso Select Line Numbers 1038 Select the Check_ANSI-C iso style and click Create The created isometric now includes the data that originated from the external database. This data can then be included on every fabrication Isometric for a particular line. The data is placed on each Isometric on a per Line# basis, and if a line splits into 1 or more sheets, all sheets have the same data. Checking is reduced, data integrity is very high.
Drive AutoCAD Plant 3D and AutoCAD P&ID Data Using the External Database Reference Manager 16 FIGURE 18: ISOMETRIC WITH LDT ATTRIBUTES