标注样式-如何居中
大家好!我正试图将一段引语的文本居中:
从…起
到
我试图研究entget,但这两个实体之间没有区别。
((-1 . <Nome entità: 7ffffb0e3d0>) (0 . "DIMENSION")
(330 . <Nome entità: 7ffffb039f0>)
(5 . "164D")
(100 . "AcDbEntity")
(67 . 0)
(410 . "Model")
(8 . "QUOTE")
(100 . "AcDbDimension")
(2 . "*D33")
(10 3680.43 -890.552 0.0)
(11 3677.28 -890.552 0.0)
(12 0.0 0.0 0.0)
(70 . 33)
(1 . "")
(71 . 5)
(72 . 1)
(41 . 1.0)
(42 . 630.0)
(73 . 0)
(74 . 0)
(75 . 0)
(52 . 0.0)
(53 . 0.0)
(54 . 0.0)
(51 . 0.0)
(210 0.0 0.0 1.0)
(3 . "Quota_m")
(100 . "AcDbAlignedDimension")
(13 3674.13 -890.552 0.0)
(14 3680.43 -890.552 0.0)
(15 0.0 0.0 0.0)
(16 0.0 0.0 0.0)
(40 . 0.0)
(50 . 0.0)
)
另一个小问题:有可能迫使这句话保持中心吗?
这就是我创建dimstyle的方式:
(defun crea_stile_quota (/)
(setq moltiplicatore 1.0
dimstylename "Quota_cm"
stile "Arial_cm")
(repeat 2
(setq dimscale (* 1 moltiplicatore)
Arrow_Size 10
Extension_Line_Origin_Offset 80
Dimension_Line_Spacing 37.5
Extension_Above_Dimension_Line 12.5
Text_Height 20
Center_Mark_Size 25
;quote_scale (/ 1.0 (expt moltiplicatore 2))
quote_scale (/ 1.0 moltiplicatore)
Gap_From_dimension_Line_to_Text 9
Decimal_Places 0
Tolerance_Decimal_places 0
Text_Movement 0
)
(setq ds
(list
(cons 0 "DIMSTYLE")
(cons 100 "AcDbSymbolTableRecord")
(cons 100 "AcDbDimStyleTableRecord")
(cons 2 dimstylename) ;Dim style name
(cons 70 0) ; Standard flag
(cons 3 ""); DIMPOST
(cons 4 ""); DIMAPOST
(cons 5 "") ;DIMBLK-Name of block instead of default arrowhead
(cons 6 "");(cons 6 "ClosedFilled"); DIMBLK1
(cons 7 "");(cons 7 DIMBLK-Name); DIMBLK2
(cons 170 0) ;DIMALT-turns off alternate units
(cons 40 dimscale) ;DIMSCALE-sets the overall scale factor applied to all dimensions
(cons 41 Arrow_Size) ;DIMASZ-sets the size of the arrow/tick
(cons 42 Extension_Line_Origin_Offset); DIMEXO
(cons 43 Dimension_Line_Spacing); DIMDLI
(cons 44 Extension_Above_Dimension_Line) ;DIMEXE-specifies how far to extend the extention line beyound the dim line
(cons 45 0.0); DIMRND
(cons 46 0) ;DIMDLE-sets the distance the dimension line extends beyond the extension line
(cons 47 0.0); DIMTP
(cons 48 0.0); DIMTM
(cons 71 0); DIMTOL
(cons 72 0); DIMLIM
(cons 73 0) ;DIMTIH-controls the position of dimension text inside extention lines ;METTE IL TESTO DI QUOTA ORIZZONTALE
(cons 74 0) ;DIMTOH-controls the position of dimension text outside extention lines
(cons 75 1); DIMSE1 ;1 sopprime la linea di estensione, 0 la lascia
(cons 76 1); DIMSE2 ;1 sopprime la linea di estensione, 0 la lascia
(cons 77 1) ;DIMTAD-controls the vertical position of text in relation to the dim line
(cons 78;DIMZIN-controls the suppression of zeros
(cons 79 1); DIMAZIN
(cons 140 Text_Height) ;DIMTXT-specifies the height of the text in the dim
(cons 141 Center_Mark_Size); DIMCEN
(cons 142 0.0); DIMTSZ
(cons 143 0.5) ;DIMALTF-controls the scale factor for alt. units
(cons 144 quote_scale); DIMLFAC ;scala di quota
(cons 145 0.0); DIMTVP
(cons 146 1.0); DIMTFAC
(cons 147 Gap_From_dimension_Line_to_Text) ;DIMGAP-sets the distance from around the dim text
(cons 170 0); DIMALT
(cons 171 3) ;DIMALTD-controls the decimal places for units
(cons 172 1) ;DIMTOFL-forces a line inside extension lines
(cons 173 0); DIMSAH
(cons 174 0); DIMTIX
(cons 175 0); DIMSOXD
(cons 176 256); DIMCLRD
(cons 177 0); DIMCLRE
(cons 178 1); DIMCRRT
(cons 179 0); DIMADEC
(cons 270 2) ;DIMUNIT-sets the units format for all dims ;2 decimale ; 4architettonico
(cons 271 Decimal_Places) ;DIMDEC-sets the number of decimal places of primary units
(cons 272 Tolerance_Decimal_places); DIMTDEC
(cons 273 2) ;DIMALTU-sets the units for alt. units
(cons 275 0) ;DIMAUNIT-sets the angular format for angular dims
(cons 276 1); DIMFRAC
(cons 277 2); DIMLUNIT ;2 decimale ; 4architettonico
(cons 278 0); DIMDSEP
(cons 279 Text_Movement); DIMTMOVE
(cons 280 0) ;DIMJUST-controls the horizontal positioning of dim text
(cons 281 0); DIMSD1
(cons 282 0); DIMSD2
(cons 283 1); DIMTOLJ
(cons 284 3); DIMTZIN
(cons 285 1); DIMALTZ
(cons 286 0) ;DIMALTTZ-Toggles the suppression in tolerance values
;(cons 287 0); DIMFIT
;(cons 288 0); DIMUPT
;(cons 289 0); DIMATFIT
(cons 340 (tblobjname "style" stile)); DIMTXSTY
;(cons 341 (cdr (assoc 330 (entget (tblobjname "block" "."))))); DIMLDRBLK
;(cons 342 (cdr (assoc 330 (entget(tblobjname "block" "_Oblique"))))); DIMBLK
;(cons 343 (cdr (assoc 330 (entget(tblobjname "block" "_Oblique"))))); DIMBLK1
;(cons 344 (cdr (assoc 330 (entget(tblobjname "block" "_Oblique"))))); DIMBLK2
;(cons 371 -2); DIMLWD
;(cons 372 -2); DIMLWE
)
)
(entmake ds)
(setq moltiplicatore 0.01
dimstylename "Quota_m"
stile "Arial_m")
)
(setq moltiplicatore 1.0)
)
谢谢
丹尼斯 作为标注样式替代(即基于每个标注):
(defun c:test ( / sel tmp xdl )
(if (setq sel (ssget "_+.:E:S:L" '((0 . "*DIMENSION"))))
(progn
(cond
( (null (setq xdl (cadr (assoc -3 (entget (ssname sel 0) '("ACAD"))))))
(setq xdl
'(
"ACAD"
(1000 . "DSTYLE")
(1002 . "{")
(1070 . 77)
(1070 . 0)
(1002 . "}")
)
)
)
( (setq tmp (member '(1070 . 77) xdl))
(setq xdl
(append
(reverse (cdr (member '(1070 . 77) (reverse xdl))))
'((1070 . 77) (1070 . 0))
(cddr tmp)
)
)
)
( (setq xdl
(reverse
(vl-list*
'(1002 . "}")
'(1070 . 0)
'(1070 . 77)
(cdr (reverse xdl))
)
)
)
)
)
(entmod (append (entget (ssname sel 0)) (list (list -3 xdl))))
)
)
(princ)
)
作为全局标注样式设置:
(cons 77 0) ;DIMTAD-controls the vertical position of text in relation to the dim line 谢谢李先生!
对第二项任务有什么建议吗?
我想把引号放在二维端点的中心,如图所示。
谢谢
不客气!
我相信你可以解决这个问题
页:
[1]