Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Lat/Long & NAD83 Conversion

  1. #1
    I could stop if I wanted to
    Join Date
    2003-03
    Location
    Alberta
    Posts
    260
    Login to Give a bone
    0

    Default Lat/Long & NAD83 Conversion

    Using MAP 2007, is there an easily accessible function for converting point data from Lat/Long to NAD83 etc. and vise versa?

    If there isn't an easy one is there a hard one?

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,419
    Login to Give a bone
    0

    Default Re: Lat/Long & NAD83 Conversion

    Is this a Map question or vba?
    C:> ED WORKING....


    LinkedIn

  3. #3
    I could stop if I wanted to
    Join Date
    2003-03
    Location
    Alberta
    Posts
    260
    Login to Give a bone
    0

    Default Re: Lat/Long & NAD83 Conversion

    I'd like to know how to convert using VBA. I've seen it down using Lisp; the (ade_proj*) functions.

  4. #4
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,419
    Login to Give a bone
    0

    Default Re: Lat/Long & NAD83 Conversion

    The ActiveX reference for Map has never been as good as the acad reference, but there is one. In the TOC, look under Programming Interfaces>Autodesk Map 3D ActiveX reference. Once inside that reference, you should find some info on the Projection property. You can change it via AttachedDrawing.Projection or Project.CurrentProjection.
    C:> ED WORKING....


    LinkedIn

  5. #5
    I could stop if I wanted to
    Join Date
    2003-03
    Location
    Alberta
    Posts
    260
    Login to Give a bone
    0

    Default Re: Lat/Long & NAD83 Conversion

    Where do I look for the ActiveX Reference for Map?

  6. #6
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,419
    Login to Give a bone
    0

    Default Re: Lat/Long & NAD83 Conversion

    TOC = Table of Contents
    C:> ED WORKING....


    LinkedIn

  7. #7
    AUGI Addict MikeJarosz's Avatar
    Join Date
    2015-10
    Location
    New York NY
    Posts
    1,497
    Login to Give a bone
    0

    Default Re: Lat/Long & NAD83 Conversion

    Quote Originally Posted by bweir
    Using MAP 2007, is there an easily accessible function for converting point data from Lat/Long to NAD83 etc. and vise versa?

    If there isn't an easy one is there a hard one?
    We had to do this same task for the broadcast mast on the top of the Freedom Tower. The broadcast industry does all of it's calculations in latitude/longitude. Although NAD 83 is the survey standard for the current WTC project, most of the site documentation from Yamasaki, the PANYNJ and others was in several different formats. The PANYNJ has a connection with the Army Corps of Engineers Survey group and we converted the site coords (from Yamasaki in NAD27) to NAD83 and they sent us back the latitude and the longitude. We had the lat/long of the fallen tower from local TV engineers and the results were comfortably close.

    Interestingly, when we gave them the x and y, they asked for the altitude (z) coordinate. It turns out latitude and longitude is dependent on elevation. And, as we later discovered, the FAA air traffic control system kicks in at 2000 feet, establishing a ceiling for high rise construction in the US. So the US can never overtake all those Asian towers that are over 2000 feet.

    To answer your question with a question: How good do you think you are at celestial measurement? I found the survey issues of the WTC daunting and was relieved when the Port Authority got the Corps of Engineers to do the calculation for us.

    Let us know how you make out. If there's a tool to do these computations buried somewhere in the software we all have, we should know about it.

  8. #8
    I could stop if I wanted to
    Join Date
    2003-03
    Location
    Alberta
    Posts
    260
    Login to Give a bone
    0

    Default Re: Lat/Long & NAD83 Conversion

    AutoCAD MAP already has the (ade_proj...) Lisp Functions for converting from one coordinate system to another. So I thought maybe I could access these through my VBA application. Here's what I put together....
    Code:
    Sub TestLLtoNAD()
    Dim VLisp As Object
    Dim VLFuncs As Object
    Dim VLFunc As Object
    Dim NADCords(1) As Double
    Dim LLCords As Variant
    Dim SourceCordSys As String
    Dim DestCordSys As String
    
        NADCords(0) = 497143.91
        NADCords(1) = 5576570.19
        
        SourceCordSys = "UTM83-12"
        DestCordSys = "LL84"
    
        Set VLisp = Application.GetInterfaceObject("VL.Application.16")
        Set VLFuncs = VLisp.ActiveDocument.functions
        
        Set VLFunc = VLFuncs.Item("(alert " & SourceCordSys & ")")
        VLFuncs.Item("eval").funcall (VLFunc)
        
        Set VLFunc = VLFuncs.Item("(ade_projsetsrc " & SourceCordSys & ")")
        VLFuncs.Item("eval").funcall (VLFunc)
        
        Set VLFunc = VLFuncs.Item("(ade_projsetdest " & DestCordSys & ")")
        VLFuncs.Item("eval").funcall (VLFunc)
        
        Set VLFunc = VLFuncs.Item("read").funcall("(ade_projptforward " & pnaddcords & ")")
        LLCords = VLFuncs.Item("eval").funcall(VLFunc)
    End Sub
    I thought I would be able to call any Lisp function this way. I've seen another example that uses the (grvecs) function to draw lines from VBA. I can't even get my (alert) function to work (for the test only, I'd use the MsgBox method later). Can anybody tell me what I'm missing?

  9. #9
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,419
    Login to Give a bone
    0

    Default Re: Lat/Long & NAD83 Conversion

    Probably not enough quotes. The ALERT func has to have its arg in quotes.

    Set VLFunc = VLFuncs.Item("(alert """ & SourceCordSys & """)")
    C:> ED WORKING....


    LinkedIn

  10. #10
    I could stop if I wanted to
    Join Date
    2002-02
    Location
    Kansas
    Posts
    487
    Login to Give a bone
    0

    Default Re: Lat/Long & NAD83 Conversion

    Set VLFunc = VLFuncs.Item("(alert " & SourceCordSys & ")")
    VLFuncs.Item("eval").funcall (VLFunc)
    should be
    Code:
     
    Set VLFunc = VLFuncs.Item("alert")
    	VLFunc.funcall SourceCordSys
    the others need to be change to

Page 1 of 2 12 LastLast

Similar Threads

  1. Lat / Long Conversion
    By jmusselman in forum VBA/COM Interop
    Replies: 2
    Last Post: 2012-10-23, 08:54 PM
  2. 2011: WGS84 to NAD83
    By Chud in forum AutoCAD Civil 3D - Survey
    Replies: 2
    Last Post: 2012-01-04, 04:08 PM
  3. Long, long list of Keywords
    By rjcrowther in forum Revit - API
    Replies: 3
    Last Post: 2007-12-10, 08:22 AM
  4. Transforming a DWG from NAD27 to NAD83
    By beachmystic in forum AutoCAD LT - General
    Replies: 2
    Last Post: 2007-12-05, 02:31 AM
  5. Transforming a DWG from NAD27 to NAD83 in the state plane environment
    By beachmystic in forum AutoCAD LT - General
    Replies: 1
    Last Post: 2007-12-05, 02:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •