加入指定基准
本帖最后由 zwq8629 于 2024-4-10 22:45 编辑[*]
[*](defun string:from-lst (lst Separator)
[*]"列表转成字符串"
[*](if (cdr lst)
[*] (strcat (car lst) Separator (string:from-lst (cdr lst) Separator))
[*] (car lst)
[*])
[*])
[*](defun string:to-lst (str Separator / pos)
[*]"字符串转成列表"
[*](if (setq pos (vl-string-search Separator str))
[*] (cons (substr str 1 pos)
[*] (string:to-lst (substr str (+ pos 1 (strlen Separator))) Separator)
[*] )
[*] (list str)
[*])
[*])
[*](defun at-pm:saveas-dxf (file-name file-path ss)
[*]"save selected entity to dxf"
[*](if (and (= 'str (type file-name))
[*] (/= "" file-name)
[*] (vl-file-directory-p file-path)
[*] (> (sslength ss) 0))
[*] (progn
[*] ;;(push-var)
[*] (setq file-name
[*] (string:from-lst
[*] (reverse (cdr (reverse (string:to-lst file-name "."))))
[*] "."))
[*] (setvar "cmdecho" 0)
[*] (setvar "filedia" 0)
[*] (vl-cmdf "_.dxfout" (strcat file-path "\\" file-name)"O" ss "" "16" )
[*] ;;(pop-var)
[*] T)
[*] nil
[*])
[*](setvar "filedia" 1)
[*])
[*](defun c:gdxf ()
[*](at-pm:saveas-dxf
[*] (getvar "DWGNAME")
[*] "D:\\024"
[*] (ssget '((-4 . "<NOT") (8 . "DIM,TEMP")(-4 . "NOT>")))))
求加入指定一点为基准点后再输入文件名保存
原帖:
求DXF输出路径 LISP - AutoLISP/Visual LISP 编程技术 - AutoCAD论坛 - 明经CAD社区 - Powered by Discuz! (mjtd.com)
导dxf需要指定点么 命令里没有点参数啊 飞雪神光 发表于 2024-4-11 15:30
导dxf需要指定点么 命令里没有点参数啊
是导出后指定一个原点 把导出的对象移到指定坐标上? ssyfeng 发表于 2024-4-11 17:17
把导出的对象移到指定坐标上?
对指定一个点为原点 谢谢分享谢谢分享谢谢分享 zwq8629 发表于 2024-4-11 17:22
对指定一个点为原点
那就先把要导出的对象移动一下不就行了,就是个移动命令的事
页:
[1]