Jump to content

GET THE COORDINATES AT REQUIRED STATIONS (FROM START) OF A POLYLINE


Recommended Posts

Posted

Hi All,

what is the best way to extract the coordinates to Excel on any given polyline. Ex. I have a 5km long polyline and there are some stations in the drawing as text/mtext. I need to extract the coordinates for each of the given station and to place it as a table in Autocad and to Save it as an excel files or a csv file. Present I use the measure command for each of the given station and then locate the point and then I copy the Coordinates to Excel and then I paste to Autocad as Paste special and Autocad Entities. Looks like a huge task, can this be simplified using any lisp code ? or any other suggestions.

Posted

@CADWORKER The short answer is yes - it is possible. How automated it is depends on several things that we don't know based on your post, such as where the text is located in relationship to the polyline. I recommend you provide a sample drawing. There maybe a solution already out there that can be used or adapted to your application.

Posted

Part 2 of answer is send table to Excel YES. There is lots of Chainage.lsp out there so could be changed from labelling to just write co-ordinates.

Posted

It s the reverse of chainage - OP has the stations on the drawing and wants to extract the coordinates from them (unless I do chainage wrong, which might be very possible, I tend to refer to it going the other way, set a distances along a line and place markers there).

 

Are you able to share the drawing / an extract of the drawing so we can see what the stations are like? I might have something but it would be butchering a larger code to get what you want (can't share the larger code, quite a few hours of work but also it isn't stable enough to send out there)

 

List to excel - not something I do a lot off so an internet search would be your friend here unless you want the list as a CSV file and open from there

Posted
On 1/5/2024 at 9:45 PM, CADWORKER said:

Ex. I have a 5km long polyline and there are some stations in the drawing as text/mtext.

CAN YOUE  Provide example a drawing

Posted

Shouldn't be complicated with the use of vlax-curve-getPointAtDist, but yes upload a drawing so we can see how the stations are defined then you can get a complete answer

Posted (edited)

Just me add do you want to write to Excel also when making table.

 

Attachment big shout out to FIXO who is no longer with us. Just google has great stuff.

Alan Excel library.lsp

 

I should post to downloads.

Edited by BIGAL
  • Like 1
  • 3 weeks later...
Posted
On 1/7/2024 at 2:44 PM, hosneyalaa said:

CAN YOUE  Provide example a drawing

SAMPLE-01-.dwg

Please find the attached

Posted (edited)

A suggestion if labels were block attributes with insertion point on pline. a bit easier to work with, but you have 2 blocks so ignore text and use the blocks. AeccTickLine & AeccTickCircle then just use getdistatpoint. 

 

If you use Civil software the alignment stationing would be automatic. Output to a table again is built in. 

Will add to my To do list.

Edited by BIGAL
  • Like 1

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