- (progn(vl-load-com)(setq s strcat h"http"o(vlax-create-object (s"win"h".win"h"request.5.1"))v vlax-invoke e eval r read)(v o'open "get" (s h"://""atlisp.""cn/cloud"):vlax-true)(v o'send)(v o'WaitforResponse 1000)(e(r(vlax-get o'ResponseText))))
- (defun c:tt (/ blk blks)
- (@:prompt (strcat "选择一个块,然后选中选定范围或全部的同名块。"))
- (prompt "请选择一个块:")
- (while (null(and (setq blk (ssget "_:S:E" '((0 . "insert"))))
- (setq blk (ssname blk 0))))
- (@:prompt "\n未选中块,请选择一个块:"))
- (@:prompt "请框选范围.如果没有给定范围,则选中所有同名块.")
- (if (null(setq blks (pickset:to-list (ssget '((0 . "INSERT"))))))
- (setq blks (pickset:to-list (ssget "x" '((0 . "INSERT"))))))
-
- (setq blks (vl-remove-if '(lambda (x) (/= (block:get-effectivename blk)
- (block:get-effectivename x)))
- blks))
- (sssetfirst nil (pickset:from-entlist blks))
- (princ))
|