欢迎来到CadTutor。
像这样的事情?
- (defun c:Test (/ bk 1p 2p)
- (setq bk "[color=red]BlockName[/color]") ;; Specify the name of block here .
- (cond
- ((not (tblsearch "BLOCK" bk))
- (alert "\n The Block Name is not found !!")
- )
- ((and (setq 1p (getpoint "\n Specify First point :"))
- (setq 2p (getpoint "\n Next point :" 1p))
- )
- (command
- "_.-insert"
- bk
- "_none"
- 1p
- (distance 1p 2p)
- (distance 1p 2p)
- (polar 1p
- (angle 1p
- (mapcar (function (lambda (q p) (* (+ p q) 0.5)))
- 1p
- 2p
- )
- )
- 1.0
- )
- )
- )
- )
- (princ)
- )
|