• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

extract coordinate lines and polyline from drawing

  • Thread starter Thread starter Zoro7610
  • Start date Start date

Zoro7610

Guest
Good day to all,
Having regard to the answers to my previous post and the enormous competence I have found in the field of lisp by the users of the forum, I kindly ask you if there is the possibility to solve this problem:
for the calculation program I use I need to give it the coordinates of every single line and polyline that make up my design. I explain some details:
- no matter where you start taking the coordinates
- the lines and polylines that make up the design on all "connected with each other"
- I care to have in excel in column at all x and in column b all y
- There's no z coordinates.

making an example:
line 1 : 4,76(x), 18,99(y) (initial point) ; 4,76(x), 16,00(y) (final point of line)
in excel must be:
column
4,76
4,76
column b
18,99
16,00

I don't know if I could explain my problem.
Thank you in advance for any help.
Hi.
 
Looking around I found this lisp that could be a starting point for what I need. In practice it creates a text file (which at the max with a macro of excel then me the amount as I want) but gives me the coordinates only of the polylines that select (to me also interest lines). other thing that should not do is insert me the "conttore" of the polylines at the beginning of the line of the text file and should not put the coords. ♪

Now I have no idea whether it is better to start with lisp from scratch or change one already ready.

I attach the lisp and txt so maybe you understand better.
Thank you.
 

Attachments

I apologize but I forgot to explain in the example of the first post one thing:
I described the first line, and so far it's okay.
the second line practically must start from the final point of the first, therefore:
line 2: 4,76(x), 16,00(y) ; 3,50(x), 17(y)

and so forth

ps.:I noticed that it is not necessary that the lisp read the polylinee also because to me they serve the coordinates and there are no differences between coordinates of the flannes and coordinates of the polylines: So I just explode the polylines and the game is done.
 
command estrdatiyou can extract the geometry (including coordinates) of all graphic entities present in the drawing.
 
thanks to the suggestion but perhaps I did not understand how to do it: I explain

I managed to create a xls file with all the coordinates I need but I couldn't put them in the right order.
in the sense that this command extracts all the coordinates of the lines but takes the lines randomly. I need you to start giving me the coordinates of a line and then proceed by taking the coordinates of the line attached to the one before.

Maybe there's a specific option for him to do this. You know how to help me?
 
This is a "simple" method to solve your problem.
transform the lines the polylinee through the _pedit _multiple command, so doing you put in sequence the various lines connected to each other, creating the different tracks.
through the lisp that I attached you, command rppunti, expose the coordinates of the polylinea vertices in a text file so formatted:
coordx coordy coordz
the file amounts it in excel using the space character as a separator.

bye
 

Attachments

Thank you very much for the answer if I was very kind.
In the week, I should have time to test.
In the meantime, however, I ask you if there is a chance to make the coordinates have all the same format: for example 00.00. I don't recommend you trying to do that, but mine is just a curiosity. I tell you this because 1 test I did it and when I went to import the txt file in excel I couldn't color the coordinates as I wanted to:
a b c d
00.00 00.00 00.00 00.00

Thank you again
Hi.
 
you can do it, but it doesn't suit.
when importing the text file into excel, in addition to specifying how to separate the space, you must indicate how format, the general, select the "advanced" button and indicate how to separate the point.
if the version you use does not support the definition of character type for decimals, do it inside the text file, replacing point with comma.

bye
 
but thank you "too much" :)

I did some evidence with excel and now I care about the file just as I want it.

Thank you very much
 
This is a "simple" method to solve your problem.
transform the lines the polylinee through the _pedit _multiple command, so doing you put in sequence the various lines connected to each other, creating the different tracks.
through the lisp that I attached you, command rppunti, expose the coordinates of the polylinea vertices in a text file so formatted:
coordx coordy coordz
the file amounts it in excel using the space character as a separator.

bye
Hi.

I found your lsp that looks like it's my case.
the only problem is that in the text file that creates me there are no quotas of points, but at all puts 0.
I start from a file with 404 polylinee ciscuna with its elevation.
Thank you.
Hi.
paola
 
Good morning, everyone. very useful lisp.
is it possible to change it so that the first column, i.e. the one that inserts the number of the entity, is separated with a space and then "staccata" from the column of the x coordinates?
That would be perfect!
Thank you very much, soon.
 
Could someone explain how I can use the Snake Lisp? I caricl the lisp in autocad, then select the polylinea and would like to get the txt file of the points, how do I get this txt file? Thank you in advance. .
 
Hi.
I'm sorry I don't know the "rppunti" program but waiting for someone to help you with this program you can download my coordinated program.
http://www.domenicoieva.com/coordinate.htmlthe program is free and also executes the export of the coordinates of the selected objects, all through an intuitive (spero...) dialog box.
 
the file is exportlistapuntipline.lsp, the command rppunti.
asks you the name of the text file that will contain data, select polylinea and the file is created.
you just have to be careful where you save the file, after the operation you open it and the content will be (eg):
0 9148 8238
0 9148 12398
0 16206 12398
0 16206 8103

Hi.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top