- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
(setq cl (Polyline (list (list (car ap) (cadr ap) 0) (list (car ap) (+ (cadr ap) pr7) 0) (list (+ (car ap) pr6) (+ (cadr ap) pr7) 0) (list (+ (car ap) pr6) (cadr ap) 0)))) (trim cl (list (+ (car ap) (/ pr6 2)) (- (cadr ap) (/ pr7 2)) 0)) (defun TRIM ( et pt /) (if (cond (etrim) (T (load "extrim.lsp" "") etrim) ) (etrim et pt) ) (setvar "highlight" 1) ) (defun Polyline (lst) (entmakex (list (cons 0 "POLYLINE") (cons 10 '(0 0 0)))) (mapcar (function (lambda (p) (entmake (list (cons 0 "VERTEX") (cons 10 (trans p 1 0)))))) lst) (entmakex (list (cons 0 "SEQEND"))))
I've got the above bit of code, using some functions found here https://www.cadtutor.net/forum/topic/18257-entmake-functions/#comments The goal is to draw an open polyline (in this case, a rectangle missing a side), then pass that polyline to the trim function to trim all lines on one side. The shape gets drawn as expected, and no error message appears but the lines will remain untrimmed. I've been able to make a similar situation with regular lines work correctly, but it doesn't seem to like polylines. My best guess is that something with passing the entity name is wrong, but I haven't yet figured out what.
Anyone have any suggestions? Thanks.
EDIT: Its also worth mentioning that using the extrim command outside of the lisp routine functions as expected in this situation.
Solved! Go to Solution.