CAD -> Google Street View

Google street view is a very powerful resource for engineers. Often times it takes some fiddling to find the exact point you want in street view.

I wrote some code to help with the process. What this code does is take the Northing and Easting in your Civil 3d drawing and convert it to Lattitude & Longitude. In order for it to do this you have to have a coordinate zone assigned to your drawing in the Civil 3d Units & Zone Tab. I demonstrate this in the video, but you can also access it by typing in EDITDRAWINGSETTINGS.

Check out the video below, and the code at the bottom of the page. Thanks!

; Written by Brian Strandberg, c3dk.com
; email: hello@c3dk.com
; Transforms coordinates from the X & Y in your drawing
; to Lattitude & Longitude
; then opens google street view at that point.
; code is not fully debugged
; requires a coordinate zone is assigned to your drawing.

(defun c:gsv (/)
(command "UCS" "World")
(if (not (getvar "CGOECS"))()(alert "fail - set coordinate zone first"))
(setq pkpt (getpoint "Select Point to see in Street View"))
(ade_projsetsrc (getvar "CGEOCS"))
(ade_projsetdest "LL84")
(setq cvp (list (car pkpt) (cadr pkpt)))
(setq result (ade_projptforward CVP))
(if (null result)
(alert "\nError in Transformation "))

(setq gsv (strcat "http://maps.google.com/maps?q=&layer=c&cbll=" (rtos (cadr result) 2 8) "," (rtos (car result) 2 8)))

(command "UCS" "P")
(command "browser" gsv)


); close defun

21 thoughts on “CAD -> Google Street View”

  1. This is a great LSP routine! Thank you for creating and distributing it.
    One issue I’ve run into, if you’re working in Grid coordinates, it works great. If you are working in Surface coordinates, scaled from a Grid coordinate, it gives you the original Grid coordinate in the DWG. Is there a way to have the LSP routine grab the Grid Scale Factor in the “Transformation” tab in the “Drawing Settings” of Civil3D?

  2. This is cool! I don’t get to job sites (since I am doing CAD 100% of the time) and this is a quick way to see it virtually. Helps me to put better construction drawings together when I know what the site looks like.

  3. This works great but I did run into a problem once Internet Explorer was uninstalled from my machine. Civil 3D no longer can run the lisp routine, is there a work around or a path to change Civil 3D from trying to locate Internet Explorer? I now receive a pop up titled “CREATEPROCESS: File Not Found” with a yellow triangle with the exclamation point saying Internet Browser Not Found. Thanks in Advance!

    1. It sounds as if once IE was removed, it didn’t make Edge the default browser. Thanks Microsoft! Try this:

      1. Select the Start Windows logo Start button button, and then type Default apps.
      2. In the search results, select Default apps.
      3. Under Web browser, select the browser currently listed, and then select Microsoft Edge or another browser.

  4. Thanks for the lisp, it works great.
    Small update to it, can we change the lisp to suit for dynamic update to the browser based on the dynamic point input in the autocad?.

Leave a Reply

Your email address will not be published. Required fields are marked *