Bill Tillman 发表于 2022-7-5 19:59:34

Dim和Text Sty的DXF代码

当我这么做的时候
我得到了一个列表,其中包含该图纸中dimstyle“D12”的大约12个DXF代码。但我们都知道dimstyle还有更多的DXF代码。除了常见的DXF部分外,我似乎找不到任何参考。我正在处理的文本样式也有同样的问题。

BIGAL 发表于 2022-7-5 20:14:49

使用vl可能更容易,如果你转储一个dim,你可以访问所有变量,大约40+个,你可以更改其中任何一个。
 
选择对象:;IAcadDimRotated:AutoCAD旋转标注界面
; 属性值:
; AltRoundDistance=0.0
; AltSubUnitsFactor=100.0
; AltSubunitySuffix=“”
; AltSuppressLeadingZeros=0
; AltSuppressTrailingZeros=0
; AltSuppressZeroFeet=-1
; AltSuppressZeroInches=-1
; AltTextPrefix=“”
; AltTextSuffix=“”
; AltTolerancePrecision=2
; AltToleranceSuppressLeadingZeros=0
; AltToleranceSuppressTrailingZeros=0
; AltToleranceSuppressZeroFeet=-1
; AltToleranceSuppressZeroInches=-1
; AltUnits=0
; AltUnits格式=2
; AltUnits精度=2
; AltUnitsScale=25.4
; 应用(RO)=#
; 箭头1block=“”
; 箭头1类型=0
; 箭头2BLOCK=“”
; 箭头2类型=0
; 箭头头大小=2.5
; 小数分隔符=“.”

Lee Mac 发表于 2022-7-5 20:25:13

(mapcar 'print (tblsearch "dimstyle" "d12"))

BIGAL 发表于 2022-7-5 20:26:15

很好的一个像往常一样李,唯一的优势是它在VL使用标签,它可能仍然是混淆什么数字指什么。

Bill Tillman 发表于 2022-7-5 20:35:56

再次感谢大家。我在维度属性方面又遇到了一个问题。请记住,这些是即时放置的,不允许用户输入或选择。所以我可以使用entmake,也可以只使用命令绘制维度,然后将它的一些属性设置为(entlast)或我临时分配给它的变量。但由于篇幅的限制,我一直在思考如何在几个维度上格式化文本。左边的图像是我最后绘制的尺寸,如下所示:
(command "._DIMLINEAR" pt1 pt2 "V" pt3 "")
但我想要的是右图中显示的内容。我想我需要更改属性“Text Inside”,但不确定如何做到这一点。

BIGAL 发表于 2022-7-5 20:45:59

只是做了简单的风格,得到了一切。
 
只需在行前说(命令“DIMTXT”3.5)等,不确定哪个DIM Var是您想要的,请按以下步骤操作,然后更改dimstyle并再次执行。差点忘了你可能需要0或1来打开/关闭
 

Command: -DIMSTYLE
Current dimension style: ISO-7   Annotative: No
Enter a dimension style option
<Restore>: V
Enter a dimension style name, [?] or <select dimension>: ISO-7
DIMADEC   0                  Angular decimal places
DIMALT      Off                  Alternate units selected
DIMALTD   4                  Alternate unit decimal places
DIMALTF   0.039                Alternate unit scale factor
DIMALTMZF   100.000            Alternate sub-zero factor for metric dimensions
DIMALTMZS                        Alternate sub-zero suffix for metric dimensions
DIMALTRND   0.000                Alternate units rounding value
DIMALTTD    4                  Alternate tolerance decimal places
DIMALTTZ    0                  Alternate tolerance zero suppression
DIMALTU   8                  Alternate units
DIMALTZ   0                  Alternate unit zero suppression
DIMAPOST                         Prefix and suffix for alternate text
DIMARCSYM   0                  Arc length symbol
DIMASZ      7.000                Arrow size
DIMATFIT    3                  Arrow and text fit
DIMAUNIT    0                  Angular unit format
DIMAZIN   0                  Angular zero supression
DIMBLK      ClosedFilled         Arrow block name
DIMBLK1   ClosedFilled         First arrow block name
DIMBLK2   ClosedFilled         Second arrow block name
DIMCEN      7.000                Center mark size
DIMCLRD   BYBLOCK            Dimension line and leader color
DIMCLRE   BYBLOCK            Extension line color
DIMCLRT   BYBLOCK            Dimension text color
DIMDEC      2                  Decimal places
DIMDLE      0.000                Dimension line extension
DIMDLI      10.500               Dimension line spacing
DIMDSEP   .                  Decimal separator
DIMEXE      3.500                Extension above dimension line
DIMEXO      1.750                Extension line origin offset
DIMFRAC   0                  Fraction format
DIMFXL      1.000                Fixed Extension Line
DIMFXLON    Off                  Enable Fixed Extension Line
DIMGAP      1.750                Gap from dimension line to text
DIMJOGANG   45d0'0"            Radius dimension jog angle
DIMJUST   0                  Justification of text on dimension line
DIMLDRBLK   ClosedFilled         Leader block name
DIMLFAC   1.000                Linear unit scale factor
DIMLIM      Off                  Generate dimension limits
DIMLTEX1    BYBLOCK            Linetype extension line 1
DIMLTEX2    BYBLOCK            Linetype extension line 2
DIMLTYPE    BYBLOCK            Dimension linetype
DIMLUNIT    2                  Linear unit format
DIMLWD      -2                   Dimension line and leader lineweight
DIMLWE      -2                   Extension line lineweight
DIMMZF      100.000            Sub-zero factor for metric dimensions
DIMMZS                           Sub-zero suffix for metric dimensions
DIMPOST                        Prefix and suffix for dimension text
DIMRND      0.000                Rounding value
DIMSAH      Off                  Separate arrow blocks
DIMSCALE    1.000                Overall scale factor
DIMSD1      Off                  Suppress the first dimension line
DIMSD2      Off                  Suppress the second dimension line
DIMSE1      Off                  Suppress the first extension line
DIMSE2      Off                  Suppress the second extension line
DIMSOXD   Off                  Suppress outside dimension lines
DIMTAD      1                  Place text above the dimension line
DIMTDEC   4                  Tolerance decimal places
DIMTFAC   1.000                Tolerance text height scaling factor
DIMTFILL    0                  Text background enabled
DIMTFILLCLR BYBLOCK            Text background color
DIMTIH      Off                  Text inside extensions is horizontal
DIMTIX      Off                  Place text inside extensions
DIMTM       0.000                Minus tolerance
DIMTMOVE    0                  Text movement
DIMTOFL   On                   Force line inside extension lines
DIMTOH      Off                  Text outside horizontal
DIMTOL      Off                  Tolerance dimensioning
DIMTOLJ   1                  Tolerance vertical justification
DIMTP       0.000                Plus tolerance
DIMTSZ      0.000                Tick size
DIMTVP      0.000                Text vertical position
DIMTXSTY    Standard             Text style
DIMTXT      7.000                Text height
DIMTXTDIRECTIONOff                  Dimension text direction
DIMTZIN   0                  Tolerance zero suppression
DIMUPT      Off                  User positioned text
DIMZIN      8                  Zero suppression

Bill Tillman 发表于 2022-7-5 20:53:11

再见,比格尔。我想我是通过使用变量“DIMTIX”找到的,如下所示:
4
尺寸不是我真正想要的,但至少我可以在尺寸界线之外设置较小的尺寸。

Bill Tillman 发表于 2022-7-5 21:04:51

在这个问题上又遇到了一件事。我无法控制哪些尺寸写在尺寸界线之外,但我需要文本位于箭头的另一侧。我知道这在很大程度上取决于首先选择哪个维度点,但文本仍然会出现在我想要的另一侧。参见下面的示例。左边的草图显示了LISP代码如何绘制尺寸,右边的草图显示了我需要它最终的样子。我正在搜索一长串DIMSTYLE变量,但似乎没有找到适合该特定设置的变量。
 
更新:好的,再次感谢你们。我发现通过使用DIMJUST变量,这也可以动态控制。
页: [1]
查看完整版本: Dim和Text Sty的DXF代码