Jump to content

Export Points


selim

Recommended Posts

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.

Link to comment
Share on other sites

  • Replies 45
  • Created
  • Last Reply

Top Posters In This Topic

  • nyaromulo

    8

  • rustysilo

    6

  • fuccaro

    5

  • eldon

    4

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 
[email="mfuccaro@hotmail.com"]mfuccaro@hotmail.com[/email] 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)
)

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.:)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 10 months later...
  • 11 months later...
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 . ) (0 . "LINE") (330 .

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 . ) (0 . "LWPOLYLINE") (330 .

) (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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • 1 month later...

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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...