Jump to content

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


CADWORKER

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 3 weeks later...

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