ACAD。lsp每次打开帮助
大家好,我创建了一个ACAD。lsp在每次打开图形时添加2个尺寸样式。
它可以工作,但每次都会打开一个帮助页面?
知道我做错了什么吗?
代码:
(command "._style" "ARIAL" "ARIAL.ttf" "0" "1" "" "" "" "")
(command
"DIMADEC" "0" ; Angular decimal places
"DIMALT" "0" ; Alternate units selected
"DIMALTD" "0" ; Alternate unit decimal places
"DIMALTF" "3.2808" ; Alternate unit scale factor
"DIMALTRND" "0" ; Alternate units rounding value
"DIMALTTD" "0" ; Alternate tolerance decimal places
"DIMALTTZ" "0" ; Alternate tolerance zero suppression
"DIMALTU" "2" ; Alternate units
"DIMALTZ" "0" ; Alternate unit zero suppression
"DIMAPOST" "'" ; Prefix and suffix for alternate text
"DIMASO" "On"
"DIMASSOC" "2"
"DIMASZ" "500" ; Arrow size
"DIMATFIT" "3" ; Arrow and text fit
"DIMAUNIT" "0" ; Angular unit format
"DIMAZIN" "3" ; Angular zero supression
"DIMBLK" "." ; Arrow block name
"DIMBLK1" "." ; First arrow block name
"DIMBLK2" "." ; Second arrow block name
"DIMCEN" "-80" ; Center mark size
"DIMCLRD" "1" ; Dimension line and leader color
"DIMCLRE" "1" ; Extension line color
"DIMCLRT" "1" ; Dimension text color
"DIMDEC" "1" ; Decimal places
"DIMDLE" "50" ; Dimension line extension
"DIMDLI" "30" ; Dimension line spacing
"DIMDSEP" "." ; Decimal separator
"DIMEXE" "50" ; Extension above dimension line
"DIMEXO" "50" ; Extension line origin offset
"DIMFIT" "3"
"DIMFRAC" "0"
"DIMGAP" "50" ; Gap from dimension line to text
"DIMJUST" "0" ; Justification of text on dimension line
"DIMLDRBLK" "." ; Leader block name
"DIMLFAC" "0.001" ; Linear unit scale factor
"DIMLIM" "0" ; Generate dimension limits
"DIMLUNIT" "2" ; Linear unit format
"DIMLWD" "-2" ; Dimension line and leader lineweight
"DIMLWE" "-2" ; Extension line lineweight
"DIMPOST" "." ; Prefix and suffix for dimension text
"DIMRND" "0.0" ; Rounding value
"DIMSAH" "0" ; Separate arrow blocks
"DIMSD1" "0" ; Suppress the first dimension line
"DIMSD2" "0" ; Suppress the second dimension line
"DIMSE1" "0" ; Suppress the first extension line
"DIMSE2" "0" ; Suppress the second extension line
"dimsho" "1"
"DIMSOXD" "0" ; Suppress outside dimension lines
"DIMTAD" "0" ; Place text above the dimension line
"DIMTDEC" "1" ; Tolerance decimal places
"DIMTFAC" "1"
"DIMTIH" "1" ; Text inside extensions is horizontal
"DIMTIX" "0" ; Place text inside extensions
"DIMTM" "200" ; Minus tolerance
"DIMTMOVE" "0" ; Text movement
"DIMTOFL" "0" ; Force line inside extension lines
"DIMTOH" "1" ; Text outside horizontal
"DIMTOL" "0" ; Tolerance dimensioning
"DIMTOLJ" "1" ; Tolerance vertical justification
"DIMTP" "0" ; Plus tolerance
"DIMTSZ" "0" ; Tick size
"DIMTVP" "0" ; Text vertical position
"DIMTXSTY" "ARIAL" ; Associated Text style
"DIMTXT" "500" ; Text height
"DIMTZIN" "0" ; Tolerance zero suppression
"dimunit" "2"
"DIMUPT" "0" ; User positioned text
"DIMZIN" "12" ; Zero suppression
"DIMFRAC" "0" ; Fraction format (0 is stacked 2 horiz)
"DIMTFAC" "1" ; Tolerance text height scaling factor
"DIMSCALE""1"
"PSLTSCALE""0"
"DIMSTYLE" "_S" "Aisle Dim" "_Y")
(command
"DIMASZ" "80" ; Arrow size
"DIMAZIN" "2" ; Angular zero supression
"DIMCEN" "0" ; Center mark size
"DIMCLRT" "7" ; Dimension text color
"DIMDEC" "2" ; Decimal places
"DIMGAP" "0" ; Gap from dimension line to text
"DIMSTYLE" "_S" "Stand Size" "_Y")
(command
"TEXTSIZE""500"
);end command
(princ)
;;;;;
谢谢 不看de代码本身,这对于代码中的某个额外输入(“”)来说是典型的
叶,你的第一行命令是一对多
gr.R。 完美-非常感谢 也许更好的做法是使用setvar而不是命令,但您需要对每一行都这样做。
更好的是,为什么不在模板dwg中创建标注样式呢。最坏情况下,从另一个dwg插入。 我这样做是因为我刚刚编辑了一个导出的暗样式。
我更喜欢直接将它们加载到我自动收到的图纸中,而不是一直插入它们。
当我的IT部门决定将我的CAD从2010年升级到2011年时,我必须检查我的所有脚本,这导致一些人给出“错误:超过了最大选择集数”。。
有趣有趣! 每次打开时修改每个图形似乎很苛刻。为什么不使用类似
添加样式之前,查看样式是否已在图形中?在我的acaddoc中,有许多设置仅根据需要进行修改。lsp。具有仅适用于外部图形的良好模板。插入带有任何文本、尺寸等样式和图层的模板似乎更容易。我永远不会在阿卡多克中使用命令调用。lsp,还有更好的方法。尽管许多AutoCAD命令会添加到选择集列表中,但始终使用本地化变量在lisp中存储选择集应该可以避免这些错误。LAYISO和MATCHPROP是最差的。
页:
[1]