PDA

View Full Version : 3D Polyline coordinates


lmitsou
2008-07-17, 03:18 PM
Hi all,

I have a 3d survey and I am trying to get some coordinates from the 3d polylines. Is there any way (without having to do it manually which would take quite some time) to get x,y and z coordinates wherever there is a grip on a 3d polyline? Perhaps a routine that would automatically add x,y,z coordinates (text or mtext) to every grip of the 3d polyline. It would be a bonus if the text/mtext could be exported to csv, txt or xls format too.

I have already used a lisp routine that did 2/3 of what I look for. I had to manually click on every grip point of the 3d polyline though which took ages.

Thanks for your help in advance.

:beer:

michel.t
2008-07-17, 04:31 PM
Entsel to choose the object
Entnext to move from one vertex to an other
Entget to get dxf codes of a vertex
Assoc 10 to retreive the x y and z coordinates

Hi all,

I have a 3d survey and I am trying to get some coordinates from the 3d polylines. Is there any way (without having to do it manually which would take quite some time) to get x,y and z coordinates wherever there is a grip on a 3d polyline? Perhaps a routine that would automatically add x,y,z coordinates (text or mtext) to every grip of the 3d polyline. It would be a bonus if the text/mtext could be exported to csv, txt or xls format too.

I have already used a lisp routine that did 2/3 of what I look for. I had to manually click on every grip point of the 3d polyline though which took ages.

Thanks for your help in advance.

:beer:

'gile'
2008-07-17, 07:20 PM
Hi,

You can have a look to this thread (http://forums.augi.com/showpost.php?p=866546&postcount=2).

lmitsou
2008-07-17, 09:10 PM
Hi,

You can have a look to this thread (http://forums.augi.com/showpost.php?p=866546&postcount=2).

Hi gile (sorry I don't know your name),

I tried to run your routine but it returns a BLANKTXT error. Not sure if I am doing something wrong. Can you please give me some instructions as to how it works?

Thanks,

'gile'
2008-07-17, 10:11 PM
Hi,

You have to load the Poly-pts routine, then you paste the following expression on the command line

((lambda (/ ent)
(if
(and (setq ent (car (entsel)))
(wcmatch (cdr (assoc 0 (entget ent))) "*POLYLINE")
)
(Poly-Pts ent)
)
)
)

lmitsou
2008-07-17, 10:49 PM
Hi gile,

Thanks for the reply. It worked fine.

Is there any way to have the coords appearing next to the vertices, perhaps as mtext or text or even blocks? This way they would be clearly visible on the drawing and also I could export them into excel.

Thanks,