本帖最后由 yaojing38 于 2023-11-13 17:31 编辑
- ;;;**************Z坐标归零 程序开始**************
- (defun c:zzz ()
- (setvar "osmode" 15359)
- (setvar "cmdecho" 0)
- (princ "\n★功能:将所有对象的Z坐标归零.")
- (command "_.UCS" "")
- (command "_.move"
- "_all"
- ""
- '(0
- 0
- 1e305
- )
- ""
- "_.move"
- "_p"
- ""
- '(0
- 0
- -1e305
- )
- ""
- )
- (princ "\n提示:已将图形中所有对象的Z坐标归零.")
- (princ)
- )
- ;;;**************Z坐标归零 程序结束**************
- ;;;**************Z坐标归零 程序开始**************
- (defun c:zzz0 (/ s)
- (setvar "osmode" 15359)
- (setvar "cmdecho" 0)
- (princ "\n★功能:将所选对象的Z坐标归零.")
- (command "_.UCS" "")
- (if (setq s (ssget))
- (command "_.move" s "" '(0 0 1e305) "" "_.move" "_p" "" '(0 0 -1e305) "")
- )
- (princ "\n提示:已将所选对象的Z坐标归零.")
- (princ)
- )
- ;;;**************Z坐标归零 程序结束**************
;以下均为论坛大佬代码,,建议你先搜搜在发问题 |