You are on page 1of 23

Description: Import Coordinates from Excel

Product: AutoPIPE
Version Number: V8i (v9.6)
Submitted By: JT
Revision: 0.0

Table of Contents
TABLE OF CONTENTS .......................................................................................................................................... 1

INTRODUCTION.................................................................................................................................................. 2
FURTHER INFORMATION .................................................................................................................................................. 2

IMPORTING GLOBAL COORDINATES FROM EXCEL ............................................................................................... 3

WORK FLOW – IMPORTING GLOBAL COORDINATES .............................................................................................................. 3


CREATE A VALID EXCEL FILE ............................................................................................................................................. 4
IMPORT EXCEL COORDINATES ........................................................................................................................................... 5

IMPORTING LOCAL COORDINATES FROM EXCEL ................................................................................................. 7


WORK FLOW – IMPORTING LOCAL COORDINATES FROM EXCEL .............................................................................................. 7
CREATE A VALID EXCEL FILE ............................................................................................................................................. 8
IMPORT EXCEL COORDINATES TO AUTOPIPE....................................................................................................................... 8
IMPORTING AUTOCAD COORDINATES FROM EXCEL .......................................................................................... 11

WORK FLOW – IMPORTING AUTOCAD COORDINATES ........................................................................................................ 11


PREPARE AUTOCAD MODEL FOR EXPORT ........................................................................................................................ 12
IMPORT MODEL TO AUTOPIPE ....................................................................................................................................... 16
IMPORTING BENTLEY MICROSTATION COORDINATES FROM CSV....................................................................... 19

WORK FLOW – IMPORTING BENTLEY MICROSTATION COORDINATES ..................................................................................... 19


EXPORT MICROSTATION MODEL .................................................................................................................................... 20
IMPORT MODEL TO AUTOPIPE ....................................................................................................................................... 22
MISCELLANEOUS INFORMATION ....................................................................................................................... 23

LIMITATIONS WITH IMPORTING MICROSTATION COORDINATES............................................................................................. 23


Introduction
AutoPIPE has the ability to import coordinates data from Excel files created using Microsoft
Office Excel (version 2007 or later) or AutoCAD, and CSV files created in MicroStation. These
Excel sheets come from user-defined local or global coordinates, as well as from AutoCAD or
Bentley MicroStation. The format of these Excel sheets are defined below as well as the process
of generating files from AutoCAD and Bentley MicroStation. Due to limitations with Excel 2007,
the maximum amount of records allowed for import is 1,048,576.

Local and global Excel templates used in this tutorial are located in the Templates folder of the
AutoPIPE install directory. AutoCAD and MicroStation examples used in this tutorial are located
in the Examples folder of the AutoPIPE install directory.

Further Information
For further information on how to import coordinates from external files, refer to online help
“Help > Bentley AutoPIPE > Command Reference > File Commands > Inserting Model >
Coordinates”. The Help button on the Import Coordinates dialog (File > Insert Model >
Coordinates) opens the same help page.
Importing Global Coordinates from Excel
Work Flow – Importing Global Coordinates

Open Global Coordinates Excel Copy Examples table to


Template Coordinates tab

Open AutoPIPE WALKTHRU


model

Open Import Coordinates dialog File > Insert Model >


Coordinates

Select the Global coordinate


option

Set Input Units File drop down


to ENGLISH

Import Model

Select base point of imported


model

Paste imported model to base


model
Create a Valid Excel File
Open the Global Coordinates template located in the Templates folder of the install directory.
Copy the table found in the Example tab to the Coordinates tab as AutoPIPE reads from the first
tab of the workbook only. Observe the format of the Global Coordinates file, which contains the
following column headers: Component, Nominal Diameter, From, To and Tee Branch.

Accepted types for the Component column are Run, Bend, Tee, Reducer, Valve, Flexible Joint,
and Flange. The nominal diameter of the pipe section for each record is defined in the Nominal
Diameter column. Note that AutoPIPE does not automatically place reducers in between piping
sections with diameter changes, leading to global consistency warnings in the model. The From
column represents the global coordinates, relative to the origin, that the component starts at,
and contains three sub columns: X1, Y1 and Z1. The To column represents the global
coordinates, relative to the origin, that the component ends at, and contains three sub
columns: X2, Y2, and Z2. Finally, the Tee Branch column is only read for tee components. For
tee components, From represents 1-Header, To represents 3-Header, and Tee Branch
represents 2-Branch.

The Nominal Diameter, From, To and Tee Branch columns may have units defined in a UNT file
located in the AutoPIPE install directory. This UNT file will be selected in the Import Coordinates
dialog. Note that due to the limitations of Excel 2007, a limit of 1,048,576 records can be
created in one worksheet.

AutoPIPE only reads the first tab in the workbook. Since the first tab does not contain any
records, copy the values in the Example tab and paste them into the appropriate columns in the
Coordinates tab. Save the Excel file in a different location and close Excel.
Import Excel Coordinates
After creating the Excel worksheet, open the AutoPIPE WALKTHRU model, located in the
Examples folder of the AutoPIPE install directory. Set A10 as the active point and open the
Import Coordinates dialog through File > Insert Model > Coordinates. Set the Coordinates radio
button to Global and set the Input Units File dropdown to the ENGLISH. Select Convert Kinks to
Bends Automatically to convert those kinks to proper long radii bends upon importing the
coordinates. If there are kinks in the model (two connected pipe runs with differing direction
vectors of more than 5 degrees), AutoPIPE will correct these. Tight pipe turns intended for small
pipe sizes may give some warning messages “Not enough clearance to fit bend”.

To locate the Excel file, click on the Browse button and open the file. AutoPIPE will attempt to
import the model and, if successful, the following note will display.

If the file is not of a valid format, the following dialog will display. Check that the table headers
match the template exactly.
After loading the file successfully, import the model by clicking the button Import. Consistency
check notes 8 warnings, which can be manually updated by the user after import. Select point
17 as the base point, as requested by AutoPIPE.

A note dialog mentions that the piping codes of source and target models are different. Click OK
to close this note and import the model.
Importing Local Coordinates from Excel
Work Flow – Importing Local Coordinates from Excel

Create a valid Excel coordinates Follow the format used in the


file Templates folder

Open an AutoPIPE model

Select the base point that the


model will be imported

Open Import Coordinates dialog File > Insert Model >


Coordinates

Select the appropriate options Select the appropriate units file


Convert Kinks to Bends

Browse for file and open

Select base point of imported


model

Paste into AutoPIPE model


Create a Valid Excel File
Open the Local Coordinates template located in the Templates folder of the install directory.
Copy the table found in the Example tab to the Coordinates tab as AutoPIPE reads from the first
tab of the workbook only. Observe the format of the Global Coordinates file, which contains the
following column headers: Component, Nominal Diameter, Global/Local, X, Y and Z.

Accepted types for the Component column are Run, Bend, Tee, Reducer, Valve, Flexible Joint,
and Flange. The Nominal Diameter column specifies the pipe’s nominal diameter. The
Global/Local column determines whether the coordinates are absolute, relative to the origin
(global), or relative to the last entry in the worksheet (local).

The Nominal Diameter, X, Y and Z columns may have units defined in a UNT file located in the
AutoPIPE install directory. This UNT file will be selected in the Import Coordinates dialog.

Note that AutoPIPE only reads the first tab in the workbook. Since the first tab does not contain
any records, copy the values in the Example tab of the template file and paste them into the
appropriate columns in the Coordinates tab. Save the Excel file in a different location and close
Excel.

Import Excel Coordinates to AutoPIPE


After creating the Excel worksheet, open the AutoPIPE WALKTHRU model, located in the
Examples folder of the AutoPIPE install directory. Select point A00; this will be the point that
the model will be imported onto. Open the Import Coordinates dialog through File > Insert
Model > Coordinates. Set the Coordinates radio button to Local and set the Input Units File
dropdown to the ENGLISH. Select Convert Kinks to Bends Automatically to convert kinks to
proper long radii bends upon importing the coordinates. If there are kinks in the model (two
connected pipe runs with differing direction vectors of more than 5 degrees), AutoPIPE will
correct these. Tight pipe turns intended for small pipe sizes may give some warning messages
“Not enough clearance to fit bend”.
To locate the Excel file, click on the Browse button and open the file. AutoPIPE will attempt to
import the model and, if successful, the following note will display.

If the file is not of a valid format, the following dialog will display. Check that the table headers
match the template exactly.

Import the model. If successful, AutoPIPE will display the imported model by itself. Select point
C00, which will be the base point to connect to A10.

Click OK on the dialog. The Paste dialog displays.


Accept the defaults.
Importing AutoCAD Coordinates from Excel
Work Flow – Importing AutoCAD Coordinates

Create a new DWG file AutoCAD

Select the proper drawing units Format > Units

Extract coordinate information Tools > Data Extraction


from model to Excel

AutoPIPE
Open WALKTHRU model in
AutoPIPE

Import Excel coordinates File > Insert Model > AutoCAD


through AutoPIPE Coordinates

Enter the appropriate nominal


diameter, drawing units and
input units file

Set vertical up to correspond to


the vertical axis in AutoCAD

Set up correct settings and IMPERIAL/8.000/Y/Decimal


import XLS file Both boxes checked

Select base point of imported


model

Paste imported model to base


model
Prepare AutoCAD Model for Export
Note that this tutorial uses AutoCAD 2012 64-bit edition.

Create a new AutoCAD drawing named ACAD1.dwg. Create two lines, the first from the origin
to 120 inches along the +Y Axis. The second line starts at the end of the first and ends 24 inches
on the +Z Axis. Save the model.

Open the Drawing Units dialog through Application Menu > Drawing Utilities > Units, or
through Format > Units. Set the type to decimal, the precision to ‘0.00’ and close the dialog.
Open the Data Extraction dialog through Insert > Linking & Extraction > Extract Data. The
coordinate data is taken from the AutoCAD model and save it into an Excel worksheet. For step
1, create a new data extraction.
User can save the extraction settings as template, Save the dxe file as Settings.dxe.

Select the current drawing as the drawing of interest. AutoCAD will use this drawing to
generate the Excel sheet by utilizing the user-determined length type.

Select line as the only entity of interest.

At step 4, AutoPIPE requires six properties: End X, End Y, End Z, Start X, Start Y and Start Z.
Step 5 shows all the data ready to be exported. Take note of any issues in the table and resolve
them here.

Note that AutoPIPE imports coordinates in the order that they appear here. Ensure that the
origin will be imported first, as shown above. Press Next.

For step 6, determine the location of the output file and leave the name as ACAD1.xls. Ensure
that this file is using the xls extension.
Finally, click Next and Finish to export the model.

Import model to AutoPIPE


Open the WALKTHRU model located in the Examples folder of the installation directory. Select
point B04 as the active point; this is where the model will be imported to. Import the newly
created AutoCAD Excel file into the existing model through File > Insert Model > AutoCAD
Coordinates.
Note that the AutoCAD WALKTHRU model automatically resets its vertical axis to Z. This will be
reverted to Y if the Transform Vertical Axis of Existing Model from Z to Y is checked.

Click on the Browse button and navigate to the location of the new Excel file. Set the Input
Units File field to IMPERIAL, which reflects what was used in AutoCAD. Select the pipe nominal
diameter to be used for the incoming model as 8.000 inches. Check the Transform Vertical Axis
of Existing Model from Z to Y, which will automatically set Vertical Up field to Y. The vertical
axis of the AutoCAD model must match the vertical axis of the AutoPIPE model.

Valid types are Architectural, Engineering, Decimal, Fractional and Scientific. Set the type to
Decimal, which should be the same as the option selected in the AutoCAD model. If desired,
check the Convert Kinks to Bends Automatically. This option inserts a long radius elbow on
each kink. Tight pipe turns intended for small pipe sizes may give some warning messages “Not
enough clearance to fit bend”. Import the model by clicking the Import button.

The original model will be replaced with the imported model in the view window. AutoPIPE will
request a point on the model that will be used to attach it to the original model. Set the Base
Point for the imported model as point 1. This point will be attached to the WALKTHRU models
point B04. Click OK on the base point dialog in the bottom left to switch back to the original
model.

The Paste dialog requests an option to be selected. Click OK to accept the default option of
Connect to selected points.
A note dialog mentions that the piping codes of source and target models are different. Click OK
to close this note and import the model.
Importing Bentley MicroStation Coordinates from CSV
Work Flow – Importing Bentley MicroStation Coordinates

Open PIPM03.dgn

Set the Master and Sub unit files Settings > Design File > Working
to Feet/Inches Units

Select the centerline string

Go to Tools > Tool Boxes and


Select XYZ and press OK

Select the output file through


Select Export coordinates Browse button and Press Single
option in the now visible toolbar button

Bentley MicroStation

AutoPIPE
Open WALKTHRU model

Open Insert MicroStation File > Insert Model >


Coordinates Dialog MicroStation Coordinates

Set up correct settings and ENGLISH/8.000/Y/Master


import CSV file Transform axis box checked

Select base point of imported


model

Paste imported model to base


model
Export MicroStation Model
Start Bentley MicroStation 08.11.09.459 or later and open testMS.dgn model located in the
Example folder of the AutoPIPE install directory. Open the Design File Settings dialog through
Settings > Design File > Working Units. Set the Master and Sub Unit fields to feet and inches,
respectively. Make note of these settings as they will be necessary later when importing the
model into AutoPIPE.

Select the center line string. Open the Tool Boxes dialog through Tools > Tool Boxes (Ctrl + T)
and add XYZ text to the selection. Press OK.

The XYZ toolbar becomes visible.


Select Export coordinates option, following dialog would be displayed

Select the output file through Browse button and Press Single button to export only the
selected coordinates. As a result a text file will be generated with the x,y and z coordinates in a
comma separated format. The following is the first few lines of the text file.
Import model to AutoPIPE
After creating the Excel worksheet, open the AutoPIPE WALKTHRU model, located in the
Examples folder of the AutoPIPE install directory. Select point B04; this will be the point that
the model will be imported onto.

Open the Import Coordinates dialog through File > Insert Model > MicroStation Coordinates.
Note that since MicroStation use a vertical Z axis, AutoPIPE will automatically convert the
WALKTHRU model to have a vertical Z axis as well. To undo this operation after the import,
check the Transform Vertical Axis of Existing Model from Z to Y. Note that the Vertical Up field
automatically updates to Y. The vertical axes of AutoPIPE and MicroStation must be the same
for a successful import. Set the Input Units Files field to ENGLISH units that correspond with the
units used in the MicroStation model. English units are in feet and inches and SI units are in
millimeters and meters.

Set Nominal Diameter to 8.000 inches and ensure the Vertical Up is set to Y. Since the vertical
axis for the WALKTHRU model is Y, check this field to transform the vertical axis. Click Import to
import the CVS file into the model.

The original model will be replaced with the imported model in the view window. AutoPIPE will
request a point on the model that will be used to attach it to the original model. Set the Base
Point for the imported model as point 1.

The WALKTHRU model is displayed in the view window again, as well as the Paste dialog. Click
OK to accept the default option.
A note dialog mentions that the piping codes of source and target models are different. Click OK
to close this note.

Miscellaneous Information
Limitations with Importing MicroStation Coordinates
Since MicroStation only generates a series of X, Y and Z coordinate components, AutoPIPE
assumes that all imported coordinates are connected. Importing non-continuous components is
possible by importing them separately.

Due to limitations with Excel 2007, the maximum amount of records allowed for import is
1,048,576.

You might also like