esbolpro Posted March 30, 2017 Posted March 30, 2017 Hello! I have a GIS drawing of electricity distribution and I need to export XY coordinates to Excel. What I need to achieve is that when I select the required polylines, I need to export X and Y coordinates of each vertex of all the selected polylines to Excel. The Excel file would consist of 3xN matrix, where N is the total number of vertexes. For example: No X Y 1 287.2105 136.1318 2 289.2800 136.9366 3 291.8095 138.2014 4 296.7535 140.2709 5 295.4888 143.9502 6 293.9941 149.4690 7 293.8791 152.4584 . . N 345.5034 174.8788 I understand that problem might seem easy, but I'm new in Autocad. Please ask questions if the problem is not clear. Any help is greatly appreciated. Thank you! Quote
BIGAL Posted March 31, 2017 Posted March 31, 2017 The quick answer http://www.lee-mac.com/polyinfo.html Is a fairly simple question and there are numerous pline co-ord programs out there I know I have one too. Its about taking one of these and re customising it to do exactly what you want please feel free to have a go at what I have attached.. Do you know anything about lisp ? pline co-ords.lsp Quote
esbolpro Posted April 1, 2017 Author Posted April 1, 2017 Thank you for your answer, BIGAL. I have an idea what lisp is, but I'm not familiar with its syntax, although I know other programming languages. The link you shared http://www.lee-mac.com/polyinfo.html - the program works just fine and this is what I actually need since it also provides the length between the segments. However, the coordinates do not match with the coordinates extracted from LIST command, although the lengths DO match. How would we solve that? Quote
esbolpro Posted April 1, 2017 Author Posted April 1, 2017 Also, can we make the program work for multiple selected polylines? Because now program outputs file when only one polyline is selected Quote
SLW210 Posted April 3, 2017 Posted April 3, 2017 I have moved your thread to the AutoLISP, Visual LISP & DCL Forum. Quote
BIGAL Posted April 4, 2017 Posted April 4, 2017 Question 1 need a sample dwg sound like you have a non world UCS set. Question 2 You may need to ask Lee nicely to modify his code. Quote
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.