wstaw blok w punkty_poszukiwane rozwiązanie

Recommended Posts

Poszukuję rozwiązania np lisp, na wstawianie bloku w wielu punktach na raz. Mam w dwg-u chmurę kilkudziesięciu punktów (points) a potrzebuję by w tych punktach został umieszczony konkretny blok. Ktoś może spotkał sie z rowiązaniem takiego problemu?

Link to comment
Share on other sites

znalazłam coś prostego.. może się komuś kiedyś przyda:

PT2BLK.LSP (c) 2003 Tee Square Graphics
converts selected points in a drawing to
insertions of a block specified by the user.

(defun C:PT2BLK (/ ss ent blk)
(while (or (not (setq blk (getstring "\nBlock name: ")))
(not (tblsearch "block" blk))))
(prompt "\nSelect points to replace: ")
(setq ss (ssget '((0 . "POINT"))))
(if ss
(setq n (1- (sslength ss)))
(while (>= n 0)
(setq pt (cdr (assoc 10 (entget (ssname ss n))))
n (1- n)
);; setq
(command "_.insert" blk pt "" "" "")
);; while
);; progn
(alert "No POINT objects selected.")
);; if
);; defun


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.