Jump to content
janwillem89

Lisp: coordinates of points to excel sheet (+point number)

Recommended Posts

janwillem89

Hello,

As a rocky acad 2009 (civil) user the Lisp command is new to me and a big challenge.

My job asks me to find the coordinates of points. The image has like 200 points, and I know more images like this are coming. Sofar I managed to match the picture with the drawing (correlate - match) and rotate the drawing (dview twist) so I can read the numbers of the points without getting a headache.

Now I have to look up the coordinates of each point. Of course I can go with the cursor the the point, write down the XY coordinates on a paper, scan it in and send it to the office. Pretty much of a job! There must be a easier way. Is Lisp a solution?

That would be: right click on the point, have the possibillity to fill in the point number; and the XYcoordinates, with the point number, are written to an excel sheet.

 

I googled a bit but as far I could find people use the other way around only: excel coordinates to a drawing.

 

Who knows a Lisp what can do this, or can someone help me out how to write a lisp like this?

 

Thanks,

Jan

Share this post


Link to post
Share on other sites
Tiger

the points are in a DWG right?

 

I'd use Data Extraction for this (under Tools). Explore it a bit, I think it's pretty self-explanatory but if any troubles, please come back.

 

The problem I see is how to match the coordinates with the points. Do the Points have some kind of identification number attached to them, or are they just points?

 

I have a lisp which prints out coordinates as MText of points that I have, I have to select all the points though. hmm....might have one that prints all coordinates of all points in one go, if your're interested?

Share this post


Link to post
Share on other sites
lpseifert

From the Civil 3D menu...

Points > Import/Export Points > Export Points

 

If the points are plain autocad points and not Civil 3D points you'll need to convert them first.

Points > Utilities > Convert from Autocad Points

Share this post


Link to post
Share on other sites
VVA

>janwillem89 Try it

If something will be not clear, I shall try to comment later.

In the text in the basic comment in Russian. It is possible to take advantage Online translator: http://www.online-translator.com/Default.aspx?prmtlang=en

 

Export of coordinates of the specified points, the chosen objects: points, blocks, polylines, splines in a text file or Excel.

Text file — txt, or csv.

A rounding off of coordinates according to current adjustments of a command _UNITS (LUPREC system variable)

 

3 commands Are certain

COOR - export of coordinates

COORN-export of coordinates with numbering. Numbers of points are drawn by the text on the current layer, the current style, current height (TEXTSIZE)

COORT-export of coordinates with numbering where number considers the text nearest to a point

New version see post #12

coorN.zip

Share this post


Link to post
Share on other sites
Phiphi

Could anyone please add a command to draw each POINT as well when using COORN. Thanks you

Share this post


Link to post
Share on other sites
Phiphi

...And making numbers can be like 5, 10, 15...

Thanks

Share this post


Link to post
Share on other sites
Phiphi
>...

3 commands Are certain

COOR - export of coordinates

COORN-export of coordinates with numbering. Numbers of points are drawn by the text on the current layer, the current style, current height (TEXTSIZE)

COORT-export of coordinates with numbering where number considers the text nearest to a point

Thank to command COORN, I can make a file of coordinates. After changing Z value, I am finding a LISP to draw lines/Pline back in CAD with points & ID marks beside.

Any help is greatly appreciated.

Share this post


Link to post
Share on other sites
VVA
Could anyone please add a command to draw each POINT as well when using COORN. Thanks you

 

...And making numbers can be like 5, 10, 15...

Thanks

Try it. Add new command CoorNP-Coordinates + Numbers + Points. Draw points with current value of PDMODE and PDSIZE.

Add to command CoorN and CoorNP Increment of number

New version see post #12

coorN.zip

Share this post


Link to post
Share on other sites
Phiphi
Try it. Add new command CoorNP-Coordinates + Numbers + Points. Draw points with current value of PDMODE and PDSIZE.

Add to command CoorN and CoorNP Increment of number

Thank a lot, VVA.

Can you please reset Numbers at middle & perpendicular to Points/Pline.

Text height can be changed as well.

Cheers, PP.

CoorNP.zip

Share this post


Link to post
Share on other sites
Oliver PT

VVA your awesome! that works a bloody treat!

Share this post


Link to post
Share on other sites
stevesfr
Try it. Add new command CoorNP-Coordinates + Numbers + Points. Draw points with current value of PDMODE and PDSIZE.

Add to command CoorN and CoorNP Increment of number

 

The command coorNP is great except I can not get the program to write to Excel ! I get the following error.

 

Save coordinates to [Text file/Excel/Not save] : E

; error: ActiveX Server returned the error: unknown name: UseSystemSeparators

Command:

 

Did I miss a setting? Save to user select file location does not appear line in save as Text.

can you help me? How to save to Excel?

Share this post


Link to post
Share on other sites
VVA

stevesfr

what version MS OFFICE do you use ? (I did not test with Office 2007)

In any case I have a little changed programs. Now it is possible to keep in a text file csv or txt a format.

How to save to Excel?
If option Excell does not work, try option Text file (csv a format) and to answer "YES" inquiry "Open text file? [Yes/No] :"

 

Commands:

COOR - export of coordinates

COORN-export of coordinates with numbering. Numbers of points are drawn by the text on the current layer, the current style, current height (TEXTSIZE)

COORT-export of coordinates with numbering where number considers the text nearest to a point

CoorNP-Coordinates + Numbers + Points. Draw points with current value of PDMODE and PDSIZE

COORNB - CoorNB-Coordinates + Block (Numbers + Points)

 

...

Rev9 - 2014-05-05 Settings (export XYZ YXZ; round)

ECoor.LSP

ECoorE rev10b.zip

Edited by VVA
fix small bug ECoorE rev10b
  • Thanks 1

Share this post


Link to post
Share on other sites
stevesfr
stevesfr

you use what version MS OFFICE? (I did not test with Office 2007)

In any case I have a little changed programs. Now it is possible to keep in a text file csv or txt a format.

 

If option Excell does not work, try option Text file (csv a format) and to answer "YES" inquiry "Open text file? [Yes/No] :"

 

PS especially it was not tested, mistakes are possible

 

 

Mistakes are possible? I think so. New version will not save file as TXT or CSV....??

Share this post


Link to post
Share on other sites
VVA

My mistake. Load new version from #12. Try again

Share this post


Link to post
Share on other sites
stevesfr

Perfect now, thanks !!!

Share this post


Link to post
Share on other sites
kassahunabdulaziz

I try to use it but it gives me a massage "Unknown command "COOR". Press F1 for help." What I done is Just change download file format from attachment.php to attachment.lsp then I go to aut0cad 2008 tools menu > load application > load file > close .would you tell me what to do?

Share this post


Link to post
Share on other sites
Lee Mac
I try to use it but it gives me a massage...

Wow, I wish my LISPs would give me a massage...

 

"Unknown command "COOR". Press F1 for help." What I done is Just change download file format from attachment.php to attachment.lsp then I go to aut0cad 2008 tools menu > load application > load file > close .would you tell me what to do?

 

Make sure you have saved the file as .lsp and that the "Save as Type" Box is set to "All Files".

Share this post


Link to post
Share on other sites
kassahunabdulaziz

Still now I couldn’t use ECoor.lsp .Would anyone help me on general steps to follow

Share this post


Link to post
Share on other sites
daffet

Hello,

I would like to extract the coordinates of a polyline with an interval of 2 meters between each point. I looked at the COORN code but I'm not really good at programming.

Can someone help me?

 

Thank you very much.

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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