CADWORKER Posted January 5 Share Posted January 5 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. Quote Link to comment Share on other sites More sharing options...
pkenewell Posted January 5 Share Posted January 5 @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. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted January 7 Share Posted January 7 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. Quote Link to comment Share on other sites More sharing options...
Steven P Posted January 7 Share Posted January 7 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 Quote Link to comment Share on other sites More sharing options...
hosneyalaa Posted January 7 Share Posted January 7 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 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted January 8 Share Posted January 8 Steven P table to excel.lsp 1 Quote Link to comment Share on other sites More sharing options...
lastknownuser Posted January 8 Share Posted January 8 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 Quote Link to comment Share on other sites More sharing options...
Steven P Posted January 8 Share Posted January 8 8 hours ago, BIGAL said: Steven P table to excel.lsp 2.26 kB · 2 downloads Thanks, saving that one away for future reference. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted January 8 Share Posted January 8 (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 January 8 by BIGAL 1 Quote Link to comment Share on other sites More sharing options...
CADWORKER Posted January 29 Author Share Posted January 29 On 1/7/2024 at 2:44 PM, hosneyalaa said: CAN YOUE Provide example a drawing SAMPLE-01-.dwg Please find the attached Quote Link to comment Share on other sites More sharing options...
BIGAL Posted January 30 Share Posted January 30 (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 January 30 by BIGAL 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.