PDA

View Full Version : Export Points



selim
12th Oct 2006, 07:24 pm
Hi I am a Surveying Engineer I use AutoCAD Land Development 2000i.
I think that I am the newest member in this forum so I don’t know much how to manage it and maybe the question that I am going to ask someone already asked but if you can help me my question is this:

How to export coordinates of points from AutoCAD work to the Excel or Notepad. Example I have 10 000 from the old work in AutoCAD. That work need to be partially replaced and need to create an Database which new and old points. How do I do that. I hope that someone can help me.

Thank you for taking your time.

fuccaro
13th Oct 2006, 04:55 am
Hello Selim and velcome!
For manipulate a huge amount of points I send you a lisp routine to save the coordinates in a text file. Run the Lisp and select the points when prompted. The WINDOW selection method can be used (or any other AutoCAD selection method), the routine will filter out other entities than POINTs. Open EXCEL and click OPEN. In the FILES OF TYPE select TEXT FILES and select the file created by the lisp. The TEXT IMPORT WIZARD will pop up. Select DELIMITED in the first step, click next and select SEMICOLON as delimiters. Click FINISH and the coordinates are on your screen!

And here is the lisp routine:

;| Save the co-ordinates of POINT entities in text file
mfuccaro@hotmail.com December 2003
_____________________________________|;
(defun c:PO2TXT (/ file points c i) ;POints to TeXT
(setq file (open (getfiled "specify output file" "c:/" "TXT" 1) "w"))
(setq points (ssget) i 0)
(repeat (sslength points)
(if (= "POINT" (cdr (assoc 0 (entget (ssname points i)))))
(setq c (cdr (assoc 10 (entget (ssname points i))))
i (1+ i)
)
)
(write-line
(strcat (rtos (car c)) " ; "
(rtos (cadr c)) " ; "
(rtos (caddr c))
) file)
)
(close file)
(Princ)
)

selim
24th Oct 2006, 11:03 pm
Thank you for your answer but I still have the same problem because I dont know to work with LISP, so if you can explain me litel bit more or you can tell me another way I will be very thankfull.

Best regards
Selim

fuccaro
25th Oct 2006, 04:45 am
It is not hard at all to use Lisp routines. If you work on a full AutoCAD -and not an LT version- you may use this power. Follow this link: http://www.cadtutor.net/forum/showthread.php?t=1390

selim
25th Oct 2006, 04:38 pm
Dear mr. Fuccaro,

I am very thankfulled that you helped me again and I think that we almost solved the problem of exporting points from dwg to txt. I think that maybe the problem is that Points are Civil Point Object. In another case these Points we EXPODED but again it apears the same argument, here is the way that I did and the argument that apears in the comand line. We folowed yuor advice but in the end we get the empty txt file.
The reason that I need this transfer is because I need these points for Total Station and GPS 530 for stakeout.

Command:
Command: _appload PO2TXT.LSP successfully loaded.
Command:
Command:
Command: PO2TXT
Select objects: Specify opposite corner: 3539 found
Select objects: *Cancel*
bad argument type: numberp: nil

eldon
25th Oct 2006, 05:40 pm
Hi selim,

I think the main difference between AutoCADers and surveyors is one of terminology i.e. what you call things. To a surveyor, a point is a mark on the ground where a detail pole was held and to which a reading was taken. It has a unique point identification number and x,y and z coordinates and possibly other stringing information. To a draughtsman, a point is an entity in the drawing.

Thus the confusion arises when you want to export points, the Autolisp boffins do not know about the other surveying properties of your point.

It is important to know how the points in your drawing are drawn. Are they simply two lines forming a cross with the level text alongside, or are they blocks with all the surveying information as attributes? If your points are blocks with attributes, then you can use the attribute extraction.

For stakeout, it is very important to know which point is which, and so the points, when extracted, have to have reference numbers. I would think that it is beyond any programming to select a whole lot of points and have them referenced in the order you wish. It may be a case for you to slog your way through the drawing point by point, unless you can find a routine to do what you want it to.:)

fuccaro
26th Oct 2006, 04:35 am
Selim
Sorry, the routine exports AutoCAD points (created with the POINT command).
Let's try again. Enter in the command line:
(entget (car (entsel)))
press enter and pick a ... "point". Press F2 to see the text screen and copy-paste here the result.

alderney
10th Nov 2006, 05:29 pm
Creat e a point group containing the points you wish to export.
Go to Points --- Export Points & select the group name you created
Export as a .txt then you may change it to an .asc file later if needed.
To import:
Points--Import points
Just follow the prompts after that.
Hope that was helpful!
Nicole

Cymro
14th Nov 2006, 10:56 am
Hi I work in a similar field using autocad 2005.
the po2txt lisp is really great and was wondering if anybody has a similar lisp to export the nodes or points on a polyline straight to a txt file or ideally an excel.
Thanks very much
Stephen

neo01
17th Sep 2007, 02:12 pm
thank you fuccaro for the lisp routine... it was really very useful...

fuccaro
17th Sep 2007, 03:45 pm
Thank you for coming back with this feed-back. Welcome in the forum!

surveyman
1st Sep 2008, 01:52 pm
Selim
Sorry, the routine exports AutoCAD points (created with the POINT command).
Let's try again. Enter in the command line:
(entget (car (entsel)))
press enter and pick a ... "point". Press F2 to see the text screen and copy-paste here the result.
This is typical of the data I wish to extract a txt file from

Command:
Select object: ((-1 . <Entity name: 400a34d0>) (0 . "LINE") (330 . <Entity
name: 40434c10>) (5 . "23AA") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8
. "A_FENCE") (100 . "AcDbLine") (10 4.86075e+006 9.89475e+006 0.0) (11
4.8595e+006 9.89482e+006 0.0) (210 0.0 0.0 1.0))

or perhaps

Command:
Select object: ((-1 . <Entity name: 40df48c8>) (0 . "LWPOLYLINE") (330 .
<Entity name: 40df4810>) (5 . "29") (100 . "AcDbEntity") (67 . 0) (410 .
"Model") (8 . "H-FOUNDATIONS") (100 . "AcDbPolyline") (90 . 18) (70 . 1) (43 .
0.0) (38 . 0.0) (39 . 0.0) (10 4.95098e+006 9.83898e+006) (40 . 0.0) (41 . 0.0)
(42 . 0.0) (10 4.95098e+006 9.84406e+006) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10
4.95143e+006 9.84406e+006) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 4.95143e+006
9.8454e+006) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 4.95098e+006 9.8454e+006) (40
. 0.0) (41 . 0.0) (42 . 0.0) (10 4.95098e+006 9.84754e+006) (40 . 0.0) (41 .
0.0) (42 . 0.0) (10 4.95004e+006 9.84754e+006) (40 . 0.0) (41 . 0.0) (42 . 0.0)
(10 4.94952e+006 9.84806e+006) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10
4.94783e+006 9.84806e+006) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 4.94731e+006
9.84754e+006) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 4.94637e+006 9.84754e+006)
(40 . 0.0) (41 . 0.0) (42 . 0.0) (10 4.94637e+006 9.8463e+006) (40 . 0.0) (41 .
0.0) (42 . 0.0) (10 4.94163e+006 9.8463e+006) (40 . 0.0) (41 . 0.0) (42 . 0.0)
(10 4.94163e+006 9.8472e+006) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 4.93643e+006
9.8472e+006) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 4.93643e+006 9.8391e+006) (40
. 0.0) (41 . 0.0) (42 . 0.0) (10 4.94141e+006 9.8391e+006) (40 . 0.0) (41 .
0.0) (42 . 0.0) (10 4.94141e+006 9.83898e+006) (40 . 0.0) (41 . 0.0) (42 . 0.0)
(210 0.0 0.0 1.0))

Can you help please?

Many thanks.

Rob

fuccaro
2nd Sep 2008, 05:53 am
Hello Surveyman, and welcome in the forum!
You are hijacking a thread about point extraction. Please start a new thread with your question, and be a litle bit more specific. What text do you try to extract... using AutoCAD LT?

nyaromulo
31st Oct 2008, 05:19 pm
I am trying to export points from AutoCAD to txt using the Lisp of PO2TXT, given by Fuccaro. (from this forum)

In the process of loading the lisp, after I select the points, I get an error that says "; error: bad argument type: numberp: nil". i have tried to explode the points in to indivindual entities as well, but the same error still occurs. What am i doing wrong?

eldon
31st Oct 2008, 05:26 pm
Perhaps your "points" are not AutoCAD points. A point is an entity and cannot be exploded, and the lisp only works with points.

nyaromulo
31st Oct 2008, 05:32 pm
Hello Eldon, the points are within the autocad drawing; so is there away to verify that they are not an AutoCAD points? please let me know

thank you

eldon
31st Oct 2008, 05:38 pm
Do a "list" on one of them, and it will tell you what they are.

nyaromulo
31st Oct 2008, 05:49 pm
It says that they are AECC COGO POINTS, is there away to convert them to an autocad COGO points before exporting them?

eldon
31st Oct 2008, 05:57 pm
It would be very helpful if you could show what version of AutoCAD you are using, because there should be ways of exporting if you are using some version of LandDesktop. But the short answer is that when you explode these AEC COGO POINTS, I have a feeling that you would not have a point left. But you should wait for someone who knows more than I.

To answer your original post, you are getting your problem, because they are not plain points. :cry:

nyaromulo
31st Oct 2008, 07:15 pm
Hello Eldon,

thank for the reply and idea...it sure help to know of new things.

I just exploded a point to check if it would work witht he Lisp, but it never did; So I an expoded it.

Currently I am using Civil 3D 2008 and AutoCAD 2008. Mostly I work with Microstation and Inroads. However we have a project that must be delivered in AutoCAD format. So i need to learn more!!!

thanks for the reply

nyaromulo
31st Oct 2008, 10:37 pm
Hello

Could you please help me export AECC points from Civil 3D 2008 drawing to txt?

thank you

rustysilo
31st Oct 2008, 11:59 pm
Have a look at this (http://www.cadtutor.net/forum/showpost.php?p=180797&postcount=10) post.

nyaromulo
3rd Nov 2008, 04:54 pm
Hello,

I have tryed to export points using the link you have given me. However I am suppose to have a DEM surface, base on the process, which I currently do not have. I only have AECC points within the Civil 3D drawing that is all i have for now. Is there another way to export points without going through the DEM surface, since i do not have DEM surface at the moment?

lpseifert
3rd Nov 2008, 05:06 pm
Did you try Points > Import/Export Points > Export Points ?

nyaromulo
3rd Nov 2008, 05:53 pm
Yes I did, and error comes says, "No points were transferred from the source" by the way I used the format of PENZD (space delimited).

rustysilo
3rd Nov 2008, 06:32 pm
No you don't use the dem or surface to export. Just right-click Points in toolspace > prospector tab... etc.

With the error you got I would almost think that you do not have any points in the dwg. Are you sure your points are Civil 3d points and not AutoCAD points, Land Desktop points, Softdesk points, etc.?

lpseifert
3rd Nov 2008, 06:44 pm
Maybe the points were created using LDD, and you opened the dwg with C3D. Try Points > Utilities > Convert Land Desktop Points. Then try to export.

nyaromulo
3rd Nov 2008, 09:51 pm
Hello

Just as you said...that is what i did and it all worked super well.

thanks so much!

FTC
27th Jul 2009, 12:59 pm
Greetings,

I’m using LDD 2009 (with the latest patches installed). After we switch to 2009 from 2007, we have been experience new problems that we are straggling and we can not solve, perhaps somebody can help us. When we try to manipulate the point’s display properties (such as markers, on/off point’s number, elev & desc), after we select the display properties routine from the pull down menu:

Command:
Points to Modify (All/Numbers/Group/Selection/Dialog) ? <All>:

If we select “All” the program doesn’t respond anymore, sometimes after around 3 or 5 minutes comes back and it gave us the next screen, this routine didn’t take that long before in LDD 2007. Any idea will be really appreciate.

Thanks

FTC
27th Jul 2009, 01:01 pm
Greetings,

I’m using LDD 2009 (with the latest patches installed). After we switch to 2009 from 2007, we have been experience new problems that we are straggling and we can not solve, perhaps somebody can help us. When we try to manipulate the point’s display properties (such as markers, on/off point’s number, elev & desc), after we select the display properties routine from the pull down menu:

Command:
Points to Modify (All/Numbers/Group/Selection/Dialog) ? <All>:

If we select “All” the program doesn’t respond anymore, sometimes after around 3 or 5 minutes comes back and it gave us the next screen, this routine didn’t take that long before in LDD 2007. Any idea will be really appreciate.

Thanks

FTC
27th Jul 2009, 01:05 pm
Greetings,

I’m using LDD 2009 (with the latest patches installed). After we switch to 2009 from 2007, we have been experience new problems that we are straggling and we can not solve, perhaps somebody can help us. When we try to manipulate the point’s display properties (such as markers, on/off point’s number, elev & desc), after we select the display properties routine from the pull down menu:

Command:
Points to Modify (All/Numbers/Group/Selection/Dialog) ? <All>:

If we select “All” the program doesn’t respond anymore, sometimes after around 3 or 5 minutes comes back and it gave us the next screen, this routine didn’t take that long before in LDD 2007. Any idea will be really appreciate.

Thanks

rustysilo
28th Jul 2009, 02:50 pm
Shouldn't have that sort of trouble unless your computer(s) just isn't up to spec for '09.

First compare your computer specs with the requirements for '09.

Second maybe uninstall both, run a registry cleaner, then reinstall only '09?

sahid68
12th Aug 2009, 11:11 am
^_^ ^_^ ^_^ ^_^ ^_^ ^_^ ^_^ ^_^ ^_^ ^_^

parttimeCAD
26th Oct 2009, 06:40 pm
Greetings all,
I don't know if i'm just being thick or have not used AutoCAD as much and regually as the rest of you all but i have read this thread a few time and still can't do it.
when i type in points in the command line i get an error.
I am looking to export "points" symbolized as a node, with an easting, northern and elevation, into an XYZ file (csv or txt). I use to do this sort of thing regually as a surveyor but have forgotten how to do it, this was using 2004 eddition i now use 2007 version. I think it was a simple solution not a "lisp" file as never heard of one of them. Some times there is 10 sometimes there is 10 000!! in which case i use a DXF backcloth and set out that way but want to get more accuracy and have a "paper trail" for my setting out.

All help much appreciated

CarlB
26th Oct 2009, 07:00 pm
Are you using Civil 3D, LDD, or plain AutoCAD?

If plain AutoCAD you'll probably need a lisp routine to do this. The particular routine may depend on what kind of point objects are in the drawing-AECC points, block with attributes, etc. What does the "list" command report for a point?

parttimeCAD
26th Oct 2009, 07:31 pm
I'm using normal AutoCAD, the list command provides the below details.
"
Customization file loaded successfully. Customization Group: ACAD
Customization file loaded successfully. Customization Group: CUSTOM
Customization file loaded successfully. Customization Group: EXPRESS
Opening an AutoCAD 2007 format file.
Substituting [simplex.shx] for [ENGINEERING.shx].
Regenerating model.
AutoCAD Express Tools Copyright © 2002-2004 Autodesk, Inc.
AutoCAD menu utilities loaded.
Autodesk DWG. This file is a Trusted DWG last saved by an Autodesk application
or Autodesk licensed application.
Command: COMMANDLINE
Command: Specify opposite corner:
Command: list
Select objects: 1 found
Select objects:
POINT Layer: "points"
Space: Model space
Handle = a0e
at point, X=421412.6109 Y=576401.0973 Z= 121.0000"
:unsure::unsure:

The "point" are taken from using the "measure" command on a polly line to produce a node every set distance for setting out.

cheers

hernanvessuri
29th Oct 2009, 05:17 pm
Thanks Fuccaro... great your script... it works just perfect...
Hernan

mohd_arastu
3rd Dec 2009, 11:30 am
Pls Help me
Thanks

rustysilo
3rd Dec 2009, 02:49 pm
What do you need help with?

parttimeCAD, did you get things worked out?

mohd_arastu
4th Dec 2009, 05:12 am
i want to know that how to import text with their coordinates from excel to auto-cad

Thanks

rustysilo
4th Dec 2009, 04:22 pm
Regular AutoCAD or a Civil product (ie - land desktop or civil 3d)???

mohd_arastu
4th Dec 2009, 06:35 pm
Regular autocad

rustysilo
4th Dec 2009, 07:59 pm
Maybe ImportXYZ (http://www.jefferypsanders.com/autolisp_IMPORTXYZ.html) is what you need? You might also try SiteTopo (http://www.sitetopo.com/) to open the file and then export the points as a dxf.

murtazachd
23rd Nov 2010, 01:23 pm
Hi
Pleae i want to draw a L.Section(profile) i need lisp to get data from Excel and draw a profile with grid and lables

KARNOLD
30th Nov 2010, 09:10 pm
This is the first lisp I have ever used and I am getting an error message error: bad character read (octal): 0. I was able to successfully run the lisp in one drawing and now am trying to run again in another drawing with no luck. Any help would be appreciated.

tallsam
26th Mar 2014, 04:22 pm
Selim
Sorry, the routine exports AutoCAD points (created with the POINT command).
Let's try again. Enter in the command line:
(entget (car (entsel)))
press enter and pick a ... "point". Press F2 to see the text screen and copy-paste here the result.

Thanks fuccaro. Really useful. I had a bunch of blocks I wanted to extract the locations of. I clicked the center of each one as a point and your lisp routine worked for me. It took me just as long as manually doing it but now I have a quicker method for next time and I learnt something. Thanks!