Message 1 of 13

Not applicable
01-27-2020
03:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
thank you all guys. I always get a lot of help this site.
I search and found this lsp. but it's a bit different from what I want.
so I modified this a little bit
I want to change it to what I want.
I search and found this lsp. but it's a bit different from what I want.
so I modified this a little bit
I want to change it to what I want.
some help
I attached a .dwg file
;=======================================================
(defun c:foo (/ e o s tmp)
(if (and (setq e (car (entsel "\nSelect a block to copy: ")))
(vlax-write-enabled-p (setq o (vlax-ename->vla-object e)))
(vlax-property-available-p o 'insertionpoint)
(setq s (ssget '((0 . "line"))))
)
(foreach l (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
(mapcar '(lambda (x)
(and (not (vl-position x tmp))
(setq tmp (cons x tmp))
(setq o (vla-copy o))
(vlax-put o 'insertionpoint x)
)
)
(list (vlax-curve-getstartpoint l) (vlax-curve-getendpoint l))
)
)
)
(princ)
)
(vl-load-com)
;=======================================================
(defun c:foo (/ e o s tmp)
(if (and (setq e (car (entsel "\nSelect a block to copy: ")))
(vlax-write-enabled-p (setq o (vlax-ename->vla-object e)))
(vlax-property-available-p o 'insertionpoint)
(setq s (ssget '((0 . "line"))))
)
(foreach l (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
(mapcar '(lambda (x)
(and (not (vl-position x tmp))
(setq tmp (cons x tmp))
(setq o (vla-copy o))
(vlax-put o 'insertionpoint x)
)
)
(list (vlax-curve-getstartpoint l) (vlax-curve-getendpoint l))
)
)
)
(princ)
)
(vl-load-com)
Solved! Go to Solution.