Jump to content

How to insert a block using Geografic Coordinates (WGS84)?


Recommended Posts

Posted

Hi guys and girls, 

 

A long time viewer but first time posting for help.

 

So i use Maps 3D and i already have a lisp that allow me to insert blocks from a txt using the X,Y,Z absolute coordinates (default cad), but now i also want to insert blocks with Geografic coordinates (like WGS84).

 

I already found and use the ade_proj... function, but that (as far i can tell) only do the opposite work, taking points (from a block for example) in a dwg file and be able to convert them to a Geografic Coordinate to export for a kml.

 

Can you tell me some function to make this conversion, or maybe a Autocad variable that allows the user to insert a block using directly coordinates in WGS84?

 

I know this can be done with some math calculation, but i think there must be some automatic way to do this with maps 3d.

 

Thanks in advanced! 

Posted

I looked into this before, but with basic AutCAD as far as I could tell it wasn't possible to convert from geographc coordinates, but not sure with some of the add-ons like maps or civil

 

 

I started going the maths and LISP route - got so far but made a typing error somewhere so it wasn't working. I'd be interested to see your LISP, not sure if it can be worked backwards? if you can share it

 

Posted
16 minutes ago, Steven P said:

I looked into this before, but with basic AutCAD as far as I could tell it wasn't possible to convert from geographc coordinates, but not sure with some of the add-ons like maps or civil

 

 

I started going the maths and LISP route - got so far but made a typing error somewhere so it wasn't working. I'd be interested to see your LISP, not sure if it can be worked backwards? if you can share it

 

 

Yep, in basic Autocad that is not possible, in Maps3D you can convert to any Geographic Coordenates using the ade_proj functions, but can't find a way to convert in Maps from Geographic to absolute, and i need to do that to be able to insert the correct blocks (to use the insert function you need to input the coordinates in absolute)...

Posted

Not sure if I understand 100% but what happens if you set a UCS including a rotation, then X Y values like 0,0 should work. But you will need to set a point as the new UCS 0,0.

Posted
9 hours ago, BIGAL said:

Not sure if I understand 100% but what happens if you set a UCS including a rotation, then X Y values like 0,0 should work. But you will need to set a point as the new UCS 0,0.

 

Hi BIGAL,

 

I dont think you understand, at least i dont understand how your sugestion will help me :)


So, imagine you have a lisp that can insert your blocks on your desire place, that lisp get from a txt file the name of the block, correct location (X, Y), rotation, layer, visibility and the several atributes (like the one i attach), and this is already done on my side! (i use the vla-insertblock function to insert the block).


What i want now is that instead of the absolute coordinates (x,y) i be able to use the Geographic ones (long, lat). I already have the dwg assign a coordinate system, in this case is UTM84-29N.

 

Right now what we need to do is in excel convert the geographic coordinates (long, lat) to absolute coordinates (x,y) and then run the lisp.

 

Hope i get myself understood now.

 

TY.

Insert.txt

Posted

You maybe missed the lat-long coordinates in the original post? 

 

lat and long of course are co-ordinates on the surface of a ball (a wonky ball as well), and OP wants to plot them onto a flat piece of paper, so needs the conversion. Not as easy as a move and rotate.

 

If you have excel you might ask in those forums too, am sure there must be a spreadsheet tool out there for your part of the world

Posted
1 hour ago, Steven P said:

You maybe missed the lat-long coordinates in the original post? 

 

lat and long of course are co-ordinates on the surface of a ball (a wonky ball as well), and OP wants to plot them onto a flat piece of paper, so needs the conversion. Not as easy as a move and rotate.

 

If you have excel you might ask in those forums too, am sure there must be a spreadsheet tool out there for your part of the world

 

Hi Steven P,

 

Yep, i need to convert them, right now we use excel to convert from the geographic coordinates (long, lat) to absolute coordinates (x,y) and then run the lisp that i have already create, i have some hope that Maps3D could be able to make itself the conversion....

Posted
13 minutes ago, BabyDuck said:

 

Hi Steven P,

 

Yep, i need to convert them, right now we use excel to convert from the geographic coordinates (long, lat) to absolute coordinates (x,y) and then run the lisp that i have already create, i have some hope that Maps3D could be able to make itself the conversion....

 

If I'm understanding you correctly, it shouldn't be too difficult to write a function that takes long, lat and converts to X, Y.  If you already have an excel sheet that does so you should be able to look at the formula and reimplement it in lisp.  It's probably going to be ugly, but I can't see why it wouldn't be possible.  

Posted
1 hour ago, TemporaryCAD said:

 

If I'm understanding you correctly, it shouldn't be too difficult to write a function that takes long, lat and converts to X, Y.  If you already have an excel sheet that does so you should be able to look at the formula and reimplement it in lisp.  It's probably going to be ugly, but I can't see why it wouldn't be possible.  

 

Yes, you are right, this is possible, but it will be very ugly, and I just can't believe that Autocad Maps doesn't have some variable or function that makes it much simpler! Like the ade_proj functions that does the exact opposite.

Posted

Post the conversion excel sheet and we can see if it is easy to convert to a LISP. even if the code is ugly - if it works you don't have to look at it

Posted

The conversion of lat long to XY is a complicated formula and has variables that match the world zone your in, so have to know those. I think it is like 10 values.

 

A google will reveal numerous answers, including possibly your current excel version, the only thing is to make sure that the formula location variables are correct for you. Like others post excel.

 

Yes had a program by Government Survey Board to do this for where I am no good for you as different part of the world. 

 

Civ3D supports import lat long points out of the box possibly Map also.

 

Did you goggle 

 

Lat & Long to Northing and Easting - Autodesk Community - AutoCAD

Posted
15 hours ago, mhupp said:

 

Hi,

 

That only "past" a image of Google Earth on the background, dont allow to choose the specific blocks you want... In Maps3D there is also a better vanilla comand to do that....

Posted
7 hours ago, BIGAL said:

The conversion of lat long to XY is a complicated formula and has variables that match the world zone your in, so have to know those. I think it is like 10 values.

 

A google will reveal numerous answers, including possibly your current excel version, the only thing is to make sure that the formula location variables are correct for you. Like others post excel.

 

Yes had a program by Government Survey Board to do this for where I am no good for you as different part of the world. 

 

Civ3D supports import lat long points out of the box possibly Map also.

 

Did you goggle 

 

Lat & Long to Northing and Easting - Autodesk Community - AutoCAD

 

Yes, I already have all the variables in excel to match the different zones of the world we are currently working on, I already googled for some solution, but I can't find anything that solves this problem.

 

Yes, Maps can also import long and lat points, but it doesn't allow you to insert blocks directly at that position as far as I know...

 

Honestly, I think I'm going to give up on the idea of finding a light solution and I'm going to go ahead with the "heavy solution", which is to rewrite all the formulas I have in excel to lisp, it won't be pretty, but it will solve the problem.

 

TY

Posted

If you import lat long points into CAD then you can find all those points and use the XY to insert a block.

 

In CIV3D as it supports Lat Long import but also can have a code on end so correct block is inserted at same time.

 

If your excel is converting lat long to a XY what is problem with inserting block ? Can it not have also a code/block name ?

 

What does your data look like.

 

 

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...