help Improving autocad lisp routine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I compiled this lisp using various programs i found online and using ai. This lisp takes a selected closed polyline and offsets the line and then selects everything inside. then it creates a file using wblock and saves it to a folder with a specified name that increases the count by one. context; this is used to quickly save drawings of insulation sheets for cutting on a cnc for precast concrete.
I was wondering if anyone would be able to help me improve this in any way or help solve some of the issues.
issues:
- you are able to click on empty space and the the lisp will still continue on to the second step.
- if you press enter without selecting anything on the second step, the counter will still go up.
- sometimes selecting a line in the first step will not offset or will offset to the inside rather than outside.
- some shapes fail, especially deep u shaped pieces. sometimes changing the offset distance to something larger will resolve this, but that is not an ideal solution.
improvements:
- reduce the amount of steps it takes. i would ideally like to select the line and the offset line will be automatically selected and exported in one go.
- improve reliability.
any input is appreciated! *disclaimer* i am not an autolisp expert and i have no idea what im doing. i just pieced together things i found and used ai and it seemed to work, so please excuse me if this lisp makes the experts cringe!
in the zip folder you will find an example dwg, a pdf explaining the command in more detail, and the lisp files. save-drawing-parts-1 offsets by 1". save-drawing-parts-2in offsets by 2". reset-wblock will reset the file name counter.
thank you!