You are currently reviewing an older revision of this page.
After importing / creating a model (for example using Modelbuilder) I noticed that the model is in the wrong location or wrong scale (for example the wrong units were accidentally selected). Is there a way I can bulk change the model element coordinates or scale up/ down the model by a certain factor?
When importing a model, it will appear using the units selected in the Modelbuilder wizard and the X and Y coordinates stored in the data source files. If you have a need to make a bulk change to the coordinate such as multiplying them all by a certain factor, there are two possible approaches:
If you own and have installed a compatible version of MicroStation, you can run the "<Storm or Water Product Name>... for MicroStation" shortcut, open the model file, then use native MicroStation commands to manipulate the location or scale the model. The underlying model database will change accordingly, so once you save it, you can then open it back up in the Standalone version to see the new coordinates.
If you have a compatible version of AutoCAD and have AutoCAD integration licensed in your Haestad product, you can similarly run the "...for AutoCAD" shortcut and use native AutoCAD commands.
With this approach, you use Modelbuilder to export the X and Y coordinates to a spreadsheet, use Excel to manipulate them, then bring them back into the model to update the locations.
NOTE: this process assumes that you have little to no pipe bends. This process only updates node X and Y and the bends (vertexes) are stored in the pipe.
1) Set up a spreadsheet with worksheets for each of the node types used in the model (the ones that need their X and Y changed). Each worksheet should contain column headers for Label, X and Y
2) In the Haestad product, start Modelbuilder and connect to the spreadsheet. In the first step, select the correct coordinate unit and uncheck the box for "create nodes if non found...".
3) Click Next three times until you get to the Field Mapping step. In here, select the appropriate element type for each of the worksheets on the left side, select Label as the Key field (make sure your element labels are all unique) and select the X and Y fields.
4) Click Next, then choose "no" when asked if you'd like to build the model
5) Back in the Modelbuilder Manager, click the entry in the list corresponding to the Modelbuilder run you juts configured and click the "sync out" button at the top. This will send the label, X and Y to the spreadsheet
6) Open the spreadsheet in Excel, set up functions to modify the X and Y accordingly and save
7) Back in the model, open Modelbuilder, click the same entry again and click the Build Model button. Note that if you created new columns in step 6 to store the updated coordinates, you'll need to edit the Modelbuilder run and change the field mapping accordingly.
This process will work with pipe bends, but assumes that you have a separate application that can manipulate shapefiles to correct the coordinates.
Building a model using Modelbuilder
Updating a model using Modelbuilder
Why does changing the scale under Tools > Options > Drawing not change the scaled pipe lengths?