ONUNEZ790318
2020-06-06, 05:17 AM
Hello!
I turn to you guys for some help.
I am trying to automate a polyline drawing (rectangle or squares... basically a four vertex shape) that is really recurrent in my work.
Basically I have an Excel table like the one attached
108238
As you can see, each row line represents the four vertices of the polylines that are supposed to be drawn using the station offset command.
Let me describe what I do manually (let's use the first row as an example):
1) Invoke PLINE
2) Type 'SO
3) Select Alignment (now that I am thinking, I could--if you need--include exact alignment name in my excel if that helps in any way)
4) When asked for station, I type 16500
5) When asked for offset, I type 5
6) When asked for another station, I type 16600
7) When asked for offset, I type 5
8) When asked for station, I type 16600
9) When asked for offset, I type -5
10) When asked for station, I type 16500
11) When asked for offset, I type -5
12) When asked for station, I type (again, to go back to vertex 1 and close the polyline) 16500
13) When asked for offset, I type (again, to go back to vertex 1 and close the polyline) 5
14) Hit enter again to finish the command, and done!
As you can see, it is very repetitive and time consuming.
Could anyone help me with a lisp or macro or idea that could probably make my life easier?
I am thinking that maybe I could incorporate some of the code in my excel for it to generate everything automatically. I don't know, I am just throwing ideas around... I hope someone can help me out.
Thank you very much!
Best regards.
I turn to you guys for some help.
I am trying to automate a polyline drawing (rectangle or squares... basically a four vertex shape) that is really recurrent in my work.
Basically I have an Excel table like the one attached
108238
As you can see, each row line represents the four vertices of the polylines that are supposed to be drawn using the station offset command.
Let me describe what I do manually (let's use the first row as an example):
1) Invoke PLINE
2) Type 'SO
3) Select Alignment (now that I am thinking, I could--if you need--include exact alignment name in my excel if that helps in any way)
4) When asked for station, I type 16500
5) When asked for offset, I type 5
6) When asked for another station, I type 16600
7) When asked for offset, I type 5
8) When asked for station, I type 16600
9) When asked for offset, I type -5
10) When asked for station, I type 16500
11) When asked for offset, I type -5
12) When asked for station, I type (again, to go back to vertex 1 and close the polyline) 16500
13) When asked for offset, I type (again, to go back to vertex 1 and close the polyline) 5
14) Hit enter again to finish the command, and done!
As you can see, it is very repetitive and time consuming.
Could anyone help me with a lisp or macro or idea that could probably make my life easier?
I am thinking that maybe I could incorporate some of the code in my excel for it to generate everything automatically. I don't know, I am just throwing ideas around... I hope someone can help me out.
Thank you very much!
Best regards.