欢迎来到CADTutor。
尝试以下例程,并根据您的愿望和距离更改“BlockName”。
- (defun c:Test (/ b d s)
- (setq b[color=blue] "BlockName"[/color] ; Block Name
- d [color=blue]1.0 [color=black]; Distance [/color][/color]
- )
- (if (and (tblsearch "BLOCK" b)
- (setq s (car (entsel "\n Select Object to measure :")))
- (if (wcmatch (cdr (assoc 0 (entget s)))
- "LINE,LWPOLYLINE,CIRCLE,ELLIPSE,ARC,SPLINE"
- )
- T
- (progn
- (princ "\n Invalid object !")
- nil
- )
- )
- )
- (command "_.measure" s "B" b "y" d)
- )
- (princ)
- )
|