Tag Archives: Cad

Data Synchronisation Series – using Free File Sync – Local C Drive Sync

We all run into problems with data eventually in engineering. Usually one of the first hurdles on large projects anyway is “displaced data” or data that is stored in multiple places and used by multiple people. Although it is possible to have fancy software solutions like Projectwise, Autodesk Vault and 12d Synergy automatically controlling your data and syncing it around etc., sometimes we either don’t have the money or the time to setup such elaborate systems. Free File Sync to the rescue.

In this blog, I’ll show you how to setup a sync between your c: drive (local) and your network location. Although the same principles apply for any other syncing. This tends to be the most useful for people working on site, or through VPN’s or at home etc.

Prerequisites

  1. Go install free file sync from here. If you use it regularly, I encourage you or your company to donate on the site.
  2. Download these scripts to help you change your environment quickly. Download Local Drive Scripts

Setting Up

  1. Firstly determine your two locations you want to sync to
    1. Local – c:\drives\b (So that the drive mapping stays the same we will create a fake B: drive to ensure referencing is maintained, you can create whatever drive you want)
    2. Server – \\servername\folder\folder etc.
  2. Open the two scripts contained in the zip and edit the paths to match your syncing locations
    1. In “Open B Local.bat” add the path to where you will store your “fake” b: drive
    2. In “Open B In Office.bat” add your server path
    3. Copy both of these scripts to your desktop for easy access
    4. If you only want to sync a specific project determine those paths. Now open free file sync and add the local path to the project in the left folder field and the server path to the right folder field. Then press compare!
    5.  So that you don’t have to keep entering the paths everytime, you can save the sync to the project folder. It’s usually useful to give it a name like
      <Project Name>_<Location 1>-<Location 2> and add it to the project folder base directory. This way all your sync pair history comes up on the left as well.
    6. You should now be able to see all the files that will be copied from the server to your local drive. If you have a lot of data you may want to add some filters to reduce the amount of data that needs to be synced everytime. Things like *.bak files *.dwl and *.dwl2 files may not be needed. You can add them to the filters button up the top.
    7. You may also want to exclude certain folders from syncing to reduce space. Down the bottom left you can see the percentage of total space that each folder consumes. To exclude it via the filter just right click on it select “exclude via filter”. Excluding using a filter saves you from having to exclude it every time you sync. You can use wild cards in the filters as well like *\SOURCE* will exclude any folders staring with source etc.
    8. Once you are happy you have all the filters and correct paths. Press “Start Synchronisation”. This will copy all the files necessary down to your C drive so you can start working

Changing Your Environment.

If your working from home Run the “Open B Local.bat”

If your back in the office “Open B In Office.bat”

Keep on Syncing

1. Once your synced for the first time. You can now run periodic syncing at your leisure. After doing a compare FFS lets you know which files are going where

2. You can turn off the different types of sync by pressing the buttons down the bottom.

3. Its pretty straight forward but:
Purple is files going left
Green is files going right
+ sign means it’s a file
no + sign means its updating an existing file
= means they are the same
BUT MOST importantly the “lightning bolt” means its changed in both locations since the last sync

4. You can change which way things go by clicking the middle bar. This is great for resolving conflicts. Click and drag to do multiple items at once.

5. Press Sync to run. A lot easier than doing it yourself manually! Plus great for working over a vpn as only the files that have changed get sent through. Rather than all the files you access.

In the next blog series on Data Synchronization I’ll talk about how to script this or even use “Real time Sync” that comes with free file sync.

Loading

Google/Bing etc. Imagery into CAD using Quantum GIS (QGIS)

This is the free option for those of you looking to get some public imagery into cad. Although I imagine if you are using Civil 3D 2015 with the new bing maps functionality. This method is a little defunct. If your using Vanilla Autocad you will need to download the GEOREFIMG lisp from CAD Studio to import

Feeling Lazy… Watch the video


QGIS or Quantum GIS has much more functionality than just saving Aerial Imagery. It’s a very comprehensive and powerful free GIS tool that should be in every designers arsenal.

Firstly install the latest version from https://www.qgis.org/en/site/forusers/download.html

1. Next open up QGIS from the desktop shortcut (im using 2.8.3 Wien when writing this)

2. Go to Plugins – > Manage and Install Plugins

3. Search for the OpenLayers Plugin and Install

4. Next we need some data to quickly get your location correct. Export either a 2007 DXF or MAPEXPORT a SHP file that contains some line work of your area that’s in a known coordinate system.

5. You can either drag drop it into QGIS or just press the “Import Vector Data button”

6. QGIS should prompt you for a coordinate system for your data. If it doesnt, right Click on the layer in the layers window on the left and select “Set Layer CRS”

7. Im in Australia so I select MGA zone 56. QGIS’s coordinate system library is incredibly comprehensive so you shouldn’t have any problems finding yours here.

8. Now the imagery, go to Web -> OpenLayers plugin -> pick a imagery source. Google/Bing/Yahoo/OSM/Apple street and aerial/hybrid sources are available

9. You should now have imagery in. You might need to change the draw order to check that your line work matches up, drag drop them so that your line work is on top.
image009
I
magery in
imagery2

10. Now just get your viewport to the imagery extents you want, then turn off the linework. The image will save whatever you are looking at, in whatever coordinate system you have specified for the project.

The resolution will be what you see is what you get (WYSIWYG) so if you want a better resolution you will need to save multiple images at a closer view. See my post here on how to do that, or watch the video above.
imagery1

11. Now save your image. Go to Project -> “Save As Image” and call it “Google-PSY” the PSY indicates it is in the WGS84 Pseudo Mercator Coordinate system.

12. We now need to read the saved image back in and convert it to the correct coordinate system been – MGA zone 55. Using the Warp (Reproject) from the Raster-> Projections menu.
imagery3

13. Specify the “Google-PSY.png” we saved, choose the output file, Make sure you specify the source coordinate system (WGS84 – Psuedo Mercator) and the target coord system (mine is MGA zone 55)
imagery4

14. Export it as a “Geotiff” and call it Google-MGA55 or whatever your coordinate system is. The Geotiff format will contain all the georeferencing information inside the file.
imagery5

15. Now just use MAPIINSERT command (GEOREFIMG lisp for vanilla cad users) to import into CAD. Pow! Imagery. This also works well for stitching bits of imagery together.

Any questions just ask below.

Loading

Alternative Stage Storage Technique – Civil 3D Tables

UPDATE 2: My new tool complete obsoletes this process.. Stage storage basin tool is available in my free tools package here
https://ceethreedee.com/ceethreedee-tools

UPDATE: Feeling Lazy. Watch the Video.

This deals with basic “basin” stage storage calculations. For more complex stockpiles etc. Read this post here

Download lisp file from this link download COT

UPDATE: instead of using COT.lsp. Try the free “Table Exporter” App from the autodesk exchange from here. Only works in 2015 unfortunately 🙁

It will dump what ever table you select straight to excel though..
exporttable1exporttable3

I see a lot of people still using this outdated tool in Civil 3D for calculating stage storage! For those who calculate stage storages read below!

Please stop using it! Although it is possible to get a relatively accurate result from it. There are a number of problems that I will merely bullet point below.

  • Can only have one contour at each level to get stage storage curve. (although you can sum them together in excel)
  • If contours are not closed this can create errors in the calculation.
  • Multiple islands and “flat areas” (i.e benching) can be easily miscalculated. Who has benching in their designs! :p
  • Higher Intervals reduces accuracy!
  • Not to mention it is cumbersome!

Civil 3D has always had the ability to do accurate stage storages, I will demonstrate below. (*with the assistance of a lisp!)

Download lisp file from this link download COT

1. Create a Volume Surface comparing Water Level or Final Tailings level etc. and your completed design. (Yes you can calculate tailings stages as well!)

2. Drop down elevations in the analysis tab at the intervals you wish to calculate your volumes at. (use Range Interval with Datum)

3. Create a surface legend table that includes “Surface Range volume” and Surface Range 2d area)
SurfaceAreaVolume

4. Copy table to left or right and explode twice, then use the attached lisp routine to convert to an autocad table.

5. Export Table to CSV as shown above and then open in excel. You will need to sum the areas and volumes from the bottom up to get the correct results.

Finished Result, sum up the volumes from the lowest elevation, (so the bottom up). or reverse the order and sum them from the top down..

Elevation (m) Plan Area (m²) Cum. Area (m²) Volume (m³) Cum. Volume (m³)
102 5,872 143,202 280,514 1,432,735
100 5,751 137,330 268,936 1,152,221
98 5,969 131,578 257,244 883,285
96 13,903 125,609 240,933 626,041
94 26,862 111,706 200,242 385,108
92 42,463 84,845 126,689 184,866
90 31,232 42,382 51,424 58,177
88 11,149 11,150 6,752 6,753
86 1 1 1 1

You will notice that unlike the old stage storage tool that can vary in accuracy especially with larger intervals. This method is exactly right down to the triangle.

Comment below if you want to know more

Loading