PDA

View Full Version : Co ordinates....



Miss Lane
5th Apr 2007, 09:27 am
Morning All!!

Hopefully just a quickie today!! Is it possible to import coordinates into cad in an xyz for example from an excel or notepad file, without using a programme designed to do this such as RapidDXF??

Thanks in advance

Kate

Miss Lane
5th Apr 2007, 09:49 am
I forgot to mention that i have autodesk map 3D 2007, and autodesk landxml reporting 7. If this helps......

ASMI
5th Apr 2007, 10:00 am
There is no problem. You can write any commands chains in MS Excel (or Notepad) than Ctr+C and Ctr+V to AutoCAD comand line. See picture :)

Miss Lane
5th Apr 2007, 10:09 am
But i have about 1000 points as a survey, with strings such as Kerb lines and Centre of road lines. And i wanted each of the strings to be distinguished from each other, either by colour or layer maybe??

If i just paste each string into CAD is there a way of plotting the coordinates all at once?

Thanks again

Kate

ASMI
5th Apr 2007, 10:14 am
Yes it possible. Can you post picture (or file) with exampe? I can suggest you correct command order or write lisp.

Miss Lane
5th Apr 2007, 10:36 am
Yes, this is the type of input file i have.
Kate

Cymro
5th Apr 2007, 10:46 am
The file looks to be an MX genio file. Don't think it is compatible to Autocad.

You should get back to the people who supplied the infornation to you and ask for it in dxf or dwg format.

Miss Lane
5th Apr 2007, 10:50 am
Yes it is a MX file, trouble is the guy that provides the info doesnt know have to give it in another format because he uses it in MOSS, is there any way of changing it myself?

Kate

Norts
5th Apr 2007, 10:55 am
Using MOSS it is possible to export to dxf, I believe.

Miss Lane
5th Apr 2007, 11:02 am
Ok

So if i get the info as a dxf file, how do i go about importing that into CAD??

Norts
5th Apr 2007, 11:05 am
create NEW drawing, then just DXFIN, and navigate to where you have put your received dxf file.
Once it has been imported, SAVE as a dwg file.

Cymro
5th Apr 2007, 11:05 am
Type dxfin on the command line

dbroada
5th Apr 2007, 11:15 am
Type dxfin on the command line
be careful of that. Versions prior to 2006 allowed you to DXFIN but 2006 just opens the file - it doesn't insert it in to an open drawing. I don't know when the change happened but it caused me a lot of problems!

Miss Lane
5th Apr 2007, 11:23 am
Yo

i'm currenlty reading all the tutorials in autodesk to see if i can find out. If i get stuck i will get back to you for more help..

Thanks guys

Cymro
5th Apr 2007, 11:24 am
Our MX guy has exported a dwg. It looks to be a local grid with a local level. I can't guarantee it's to the coordinates you want, but it only took him 5 minutes.

ASMI
5th Apr 2007, 02:12 pm
I write short lisp and it draw something 3DPolylines by coordinates from your *.txt file.


(defun c:surv(/ dFile fTag curLst drLst curLn tPos
xStr yStr zStr oldOsn)
(if
(setq dFile
(getfiled "Select file with coordinates" "c:\\" "txt" 0))
(progn
(setq fTag(open dFile "r"))
(while
(setq curLn(read-line fTag))
(if(wcmatch curLn "*D+*D+*D+*")
(progn
(setq tPos(vl-string-search "D+" curLn)
xStr(substr curLn 1 tPos)
curLn(substr curLn(+ 5 tPos))
tPos(vl-string-search "D+" curLn)
yStr(substr curLn 1 tPos)
curLn(substr curLn(+ 5 tPos))
tPos(vl-string-search "D+" curLn)
zStr(substr curLn 1 tPos)
curLst(append curLst
(list(mapcar 'atof(list xStr yStr zStr))))
); end setq
); end progn
(if curLst
(setq curLst(vl-remove(last curLst)curLst)
drLst(append drLst(list curLst))
curLst nil); end if
); end if
); end if
); end while
(if curLst
(setq curLst(vl-remove(last curLst)curLst)
drLst(append drLst(list curLst)))
); end if
(setq oldOsn(getvar "OSMODE"))
(setvar "OSMODE" 0)
(setvar "CMDECHO" 0)
(foreach lst drLst
(command "_.3DPoly")
(apply 'command lst)
(command)
); end foreach
(setvar "OSMODE" oldOsn)
(setvar "CMDECHO" 1)
); end progn
); end if
(princ)
); end of c:surv

Is result *.dwg correct?

ASMI
5th Apr 2007, 02:23 pm
I set drawing units in mm, i think there need other units :) If you want I can to improve this routine.

Alan Cullen
9th Apr 2007, 11:26 pm
Open the dxf file (select dxf file type from the open window) and save it as a dwg file.

Make sure he creates the dxf file as a 3D file. MOSS may do this automatically, but for e.g. 12D Model gives the option of 3D or 2D output.

EDIT......oops, sorry all, I didn't see the second page of this thread. The query has definitely been answered......my bad.