生成/修改dimstyle
大家好在autocad2010中
对于“风格”,我们可以很容易地使用下面的代码来构建新的风格。
(if (= (tblsearch "style" "standard") nil)
(command "style" "standard" "arial" "3.5" "0.666" "0.0" "" "" "")
(command "style" "standard" "arial" "3.5" "0.666" "0.0" "" "" "")
)
“dimstyle”的故事似乎不一样
如果我想构建一个名为“standard”的新“dimstyle”,我应该怎么做?
如果“标准”存在,我想修改“标准”的一些选项,那么我该怎么办??
谁能给我一些示例代码吗?
谢谢你的帮助。 下面是一个关于如何创建dimstyle的线程
http://www.cadtutor.net/forum/showthread.php?50845-维度样式创建-%28 plz chk my new lisp amp how to improve%29
在此处查看如何修改dimstyle
http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/DImstyle-modification-using-Table-record/m-p/2776102#U2776102 谢谢你的回复。 您好,看完帖子后,我仍然很困惑,仍然不知道如何构建/修改“dimstyle”:( 请举例说明要在现有dimstyle中修改的内容
顺便说一句,我编辑了我的第一篇文章,其中包含了一个关于如何创建dimstyle的线程
好的,新的线程应该会帮助很多,谢谢你。 可以使用以下简单命令创建新尺寸:
(vl-cmdf "_.-dimstyle" "_save" "New Dims." )
塔瓦特 非常感谢。 嗨,经过你的帮助,我终于知道怎么做了。
以下是代码:
(defun build_dimstyle(/)
(if (= (tblsearch "dimstyle" "standard") nil)
;then
(command "dimstyle" "s" "标准")
;else
(command "dimstyle" "r" "standard")
)
(princ "start setting")
(foreach setuplisp '(
("dimtxt" . 3.5)
("DIMADEC" . 2)
("DIMALTRND" . 0.0000)
("DIMARCSYM" . 2)
("DIMASZ" . 2.5000)
("DIMATFIT" . 3)
("DIMAUNIT" . 0)
("DIMAZIN" . 0)
)
(setvar (car setuplisp) (cdr setuplisp))
)
(command "-dimstyle" "s" "standard" "yes")
)
顺便说一句
有人知道怎么做吗?
http://www.cadtutor.net/forum/showthread.php?52664-更改箭头尾部的长度&p=356629#post356629 干得好blueshake。
如果你愿意的话,这里有另一种同样结果的方法。并做了如下修正。
看看这个。
(defun build_dimstyle (/)
(if (not (tblsearch "dimstyle" "standard"))
(command "_.-dimstyle" "_s" "??")
(command "_.-dimstyle" "_r" "standard")
)
(princ "start setting")
(mapcar 'setvar '("dimtxt" "DIMADEC" "DIMALTRND" "DIMARCSYM" "DIMASZ" "DIMATFIT" "DIMAUNIT" "DIMAZIN")
'(3.5 2 0.0000 2 2.5000 3 0 0))
(command "_.-dimstyle" "_s" "standard" "_yes")
)
除此之外,还可以使用dimstyle entmake转换为dimstyle,速度稍快。
祝你好运
塔瓦特
页:
[1]
2