Message 1 of 11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello good people.
Is it me or just autocad being autocad? Im trying to insert a block where 2 certain polylines meet.
Just to test i put a command "_zoom" before the insertions happen, and the problem went away, but it makes the program run slower, and not very elegant of a solution i guess. How should i get around this ideally?
Thanks everyone!
(vl-load-com)
(defun c:SWPNT (/ ss i ent firstPnt lastPnt)
(setq ss (ssget '((0 . "*POLYLINE,LINE")(8 . "*swept_tee*"))))
(setq i 0)
(repeat (sslength ss)
(setq ent (vlax-ename->vla-object (ssname ss i)))
(setq firstPnt (vlax-curve-getStartPoint ent))
(setq lastPnt (vlax-curve-getEndPoint ent))
;(command "_zoom" "_C" lastPnt 300); IF i leave this in, things work as intended
(cond ((ssget "_C" firstPnt firstPnt '((0 . "*POLYLINE,LINE") (8 . "*alep_s*") (-4 . "<not")(8 . "*swept_tee*")(-4 . "not>")))
(entmakex (list (cons 0 "INSERT") (cons 2 "sweptee_point") (cons 10 firstPnt)(cons 8 "_alep_swept_tee_pont")))
);cond
((ssget "_C" lastPnt lastPnt '((0 . "*POLYLINE,LINE") (8 . "*alep_s*") (-4 . "<not")(8 . "*swept_tee*")(-4 . "not>")))
(entmakex (list (cons 0 "INSERT") (cons 2 "sweptee_point") (cons 10 lastPnt)(cons 8 "_alep_swept_tee_pont")))
);cond
);cond legvége
(setq i (+ 1 i))
);repeat
);defun
Solved! Go to Solution.