马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
 - ;;命名保存当前 UCS
- (defun fy:saveucs (name)
- (if (and name (not (tblsearch "ucs" name)))
- (vla-add (fy:acucss)
- (vlax-3d-point (getvar "ucsorg"))
- (vlax-3d-point (getvar "ucsxdir"))
- (vlax-3d-point (getvar "ucsydir"))
- name
- )
- )
- )
- ;;删除命名 UCS
- (defun fy:delucs (nlst)
- (if (= (type nlst) 'STR)
- (setq nlst (list nlst))
- )
- (mapcar '(lambda (x)
- (if (tblsearch "ucs" x)
- (vla-delete (vla-item (fy:acucs) x))
- )
- )
- nlst
- )
- )
- ;;相当于 command ucs w ,可以放入 begin
- (defun fy:setwcs ()
- (if (zerop (getvar "worlducs"))
- (progn
- (fy:saveucs "$fytempucs")
- (vla-put-activeucs
- (fy:acdoc)
- (vla-add (fy:acucss)
- (vlax-3d-point '(0 0 0))
- (vlax-3d-point '(1 0 0))
- (vlax-3d-point '(0 1 0))
- "$fytempwcs"
- )
- )
- )
- )
- )
- ;;恢复 UCS, 可以放入 end
- (defun fy:restoreucs ()
- (if (tblsearch "ucs" $fytempucs)
- (vla-put-activeucs
- (fy:acdoc)
- (vla-item (fy:acucss) $fytempucs)
- )
- )
- (fy:delucs '("$fytempwcs" "$fytempucs"))
- )
|