;;;;;;;;;; Проверка и установка размерных стилей ;;;;;;;;;;;;;;;;;;;;;;;
;;19.05.2003 Kharit Начиная с acad2002 DIMASO не используется, вместо нее DIMASSOC
(setq dimvars1
(list "DIMALT" "DIMALTD" "DIMALTF" "DIMAPOST" (if (< (atof (getvar "acadver")) 15.06) "DIMASO" "DIMASSOC") "DIMASZ"
"DIMCEN" "DIMCLRD" "DIMCLRE" "DIMCLRT" "DIMDLE" "DIMDLI"
"DIMEXE" "DIMEXO" "DIMGAP" "DIMLFAC" "DIMLIM" "DIMPOST"
"DIMRND" "DIMSAH" "DIMSE1" "DIMSE2" "DIMSHO" "DIMSOXD"
"DIMTAD" "DIMTFAC" "DIMTIH" "DIMTIX" "DIMTM" "DIMTOFL"
"DIMTOH" "DIMTOL" "DIMTP" "DIMTSZ" "DIMTVP" "DIMTXT"
"DIMZIN"
"DIMALTTD" "DIMALTTZ" "DIMALTU" "DIMALTZ" "DIMAUNIT" "DIMDEC"
"DIMFIT" "DIMJUST" "DIMSD1" "DIMSD2" "DIMTDEC" "DIMTOLJ"
"DIMTXSTY" "DIMTZIN" "DIMUNIT" "DIMTMOVE"
)
)
;;;Для 15 АвтоКАДА возможность передвигать размерный текст - 12.04.2001
;;;(if(wcmatch (getvar "ACADVER")"*15*")(setvar "DIMTMOVE" 1))
;;15.12.2004 Kharit DIMTMOVE добавлена в общий список
;(setvar "DIMTMOVE" 2)
(setq ARKO
IM:STYLE (getvar "DIMSTYLE"))
(if(or NEW:SCALE
(not (tblsearch "DIMSTYLE" "PS_ARROW"))
(and (getvar"DIMDEC")(/= 0 (ex(tblsearch "DIMSTYLE""PS_ARROW")271))))
(progn
(mapcar 'setvar dimvars1
'(0 2 25.4 "" 1 1.0 2.0 0 0 0 1.5 0.0 0.0 2.0 1.0 1.0 0 ""
0.0 1 1 1 0 0 1 1.0 0 1 0.0 1 0 0 0.0 0.0 0.0 2.5 0
2 0 2 0 0 0 3 0 0 0 2 1 "txt0" 0 2 2)
)
(command "._DIM" "_DIMBLK" "." "_DIMBLK1" "DBLK_2" "_DIMBLK2" "DBLK_2"
"_SAV" "PS_ARROW")
(if (tblsearch "DIMSTYLE" "PS_ARROW") (command "_Y"))
(command "_EXIT")
))
(if(or NEW:SCALE
(not (tblsearch "DIMSTYLE" "PS_ARROW_EXTLINES"))
(and (getvar"DIMDEC")(/= 0 (ex(tblsearch "DIMSTYLE""PS_ARROW_EXTLINES")271))))
(progn
(mapcar 'setvar dimvars1
'(0 2 25.4 "" 1 4.0 2.0 0 0 0 1.5 0.0 2.0 2.0 1.0 1.0 0 ""
0.0 0 0 0 0 0 1 1.0 0 1 0.0 1 0 0 0.0 0.0 0.0 2.5 0
2 0 2 0 0 0 3 0 0 0 2 1 "txt0" 0 2 2)
)
(command "._DIM" "_DIMBLK" "." "_DIMBLK1" "." "_DIMBLK2" "."
"_SAV" "PS_ARROW_EXTLINES")
(if (tblsearch "DIMSTYLE" "PS_ARROW_EXTLINES") (command "_Y"))
(command "_EXIT")
))
(if(or NEW:SCALE
(not (tblsearch "DIMSTYLE" "PS_DOT"))
(and (getvar"DIMDEC")(/= 0 (ex(tblsearch "DIMSTYLE""PS_DOT")271))))
(progn
(mapcar 'setvar dimvars1
'(0 2 25.4 "" 1 1.0 2.0 0 0 0 1.5 0.0 2.0 2.0 1.0 1.0 0 ""
0.0 0 1 1 0 0 1 1.0 0 1 0.0 1 0 0 0.0 0.0 0.0 2.5 0
2 0 2 0 0 0 3 0 0 0 2 1 "txt0" 0 2 2)
)
(command "._DIM" "_DIMBLK" "DBLK_1" "_DIMBLK1" "." "_DIMBLK2" "."
"_SAV" "PS_DOT")
(if (tblsearch "DIMSTYLE" "PS_DOT") (command "_Y"))
(command "_EXIT")
))
(if(or NEW:SCALE
(not (tblsearch "DIMSTYLE" "PS_DOT_EXTLINES"))
(and (getvar"DIMDEC")(/= 0 (ex(tblsearch "DIMSTYLE""PS_DOT_EXTLINES")271))))
(progn
(mapcar 'setvar dimvars1
'(0 2 25.4 "" 1 0.5 2.0 0 0 0 1.5 0.0 2.0 2.0 1.0 1.0 0 ""
0.0 0 0 0 0 0 1 1.0 0 1 0.0 1 0 0 0.0 0.0 0.0 2.5 0
2 0 2 0 0 0 3 0 0 0 2 1 "txt0" 0 2 2)
)
(command "._DIM" "_DIMBLK" "." "_DIMBLK1" "." "_DIMBLK2" "."
"_SAV" "PS_DOT_EXTLINES")
(if (tblsearch "DIMSTYLE" "PS_DOT_EXTLINES") (command "_Y"))
(command "_EXIT")
))
(if(or NEW:SCALE
(not (tblsearch "DIMSTYLE" "PS_TICK_EXTLINES"))
(and (getvar"DIMDEC")(/= 0 (ex(tblsearch "DIMSTYLE""PS_TICK_EXTLINES")271))))
(progn
(mapcar 'setvar dimvars1
'(0 2 25.4 "" 1 0.0 2.0 0 0 0 2.0 0.0 2.0 2.0 1.0 1.0 0 ""
0.0 0 0 0 0 0 1 1.0 0 1 0.0 1 0 0 0.0 1.0 0.0 2.5 0
2 0 2 0 0 0 3 0 0 0 2 1 "txt0" 0 2 2)
)
(command "._DIM" "_DIMBLK" "." "_DIMBLK1" "." "_DIMBLK2" "."
"_SAV" "PS_TICK_EXTLINES")
(if (tblsearch "DIMSTYLE" "PS_TICK_EXTLINES") (command "_Y"))
(command "_EXIT")
))
(if (or NEW:SCALE
(not (tblsearch "DIMSTYLE" "PS_TICK"))
(and (getvar"DIMDEC")(/= 0 (ex(tblsearch "DIMSTYLE""PS_TICK")271))))
(progn
(mapcar 'setvar dimvars1
'(0 2 25.4 "" 1 1.0 2.0 0 0 0 1.5 0.0 2.0 2.0 1.0 1.0 0 ""
0.0 0 1 1 0 0 1 1.0 0 1 0.0 1 0 0 0.0 0.0 0.0 2.5 0
2 0 2 0 0 0 3 0 0 0 2 1 "txt0" 0 2 2)
)
(command "._DIM" "_DIMBLK" "DBLK_0" "_DIMBLK1" "." "_DIMBLK2" "."
"_SAV" "PS_TICK")
(if (tblsearch "DIMSTYLE" "PS_TICK") (command "_Y"))
(command "_EXIT")
))
(if(not(member (strcase ARKO
IM:STYLE)
'("PS_ARROW" "PS_ARROW_EXTLINES" "PS_DOT" "PS_DOT_EXTLINES"
"PS_TICK_EXTLINES" "PS_TICK")))
(progn
(command "._DIM" "_RES" "PS_TICK" "_EXIT" )
(setq ARKO
IM:STYLE (getvar "DIMSTYLE"))
)
)
(setq NEW:SCALE nil)
(foreach ltype '("PS-DASHDOT1" "PS-DASHDOT2" "PS-DASHDOT3" "PS-GOST2.303 5" "PS-GOST2.303 6")
(if (not (tblsearch "LTYPE" ltype))
(progn
(command "_LINETYPE" "_L" ltype "pstudio.lin" "")
))
)
(arps_setCurrentScale curScale)
(princ)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;