sachindkini Posted 21 hours ago Posted 21 hours ago (edited) Dear All, im trying create a annotative dimension style and text style style . annotation text style link to annotation dimstyle . create text style and dimethyl but annotative symbole not shown in dimension style and also text style )DIM-100 & DIM-200 is annotative dimension style) (defun c:TEST () (setvar "cmdecho" 0) (setvar "expert" 0) (command "undo" "be") (princ "\nFunction: Quickly create new dimension styles.\n") (if (not (tblsearch "STYLE" "STANDARD")) (command "style" "Standard" "txt" "" "1" "" "" "") ) (if (not (tblsearch "STYLE" "STANDARD")) (command ".-style" "STANDARD" "TXT" "0" "1" "0" "N" "N" "N") ) (command "dimadec" "2" "dimalt" "off" "dimalttz" "1" "dimaltu" "2" "dimassoc" "2" "dimasz" "1" "dimatfit" "3" "dimaunit" "0" "dimazin" "0" "dimblk" "_ARCHTICK" "dimcen" "0" "dimclrd" "0" "dimclre" "0" "dimclrt" "0" "dimdec" "2" "dimdle" "0.00" "dimdli" "0.05" "dimdsep" "." "dimexe" "0.35" "dimexo" "0.35" "dimfxlon" "off" "dimgap" "0.5" "dimjust" "0" "dimldrblk" "_ARCHTICK" "dimlfac" "1" "dimlunit" "2" "dimscale" "1" "dimtad" "1" "dimtdec" "2" "dimtfac" "1" "dimtfill" "0" "dimtfillclr" "0" "dimtih" "off" "dimtix" "off" "dimtmove" "0" "dimtofl" "on" "dimtol" "off" "dimtolj" "1" "dimtxsty" "Standard" "dimtxt" "2.5" "dimtzin" "1" "dimupt" "off" "dimzin" "1" ) (if (not (tblsearch "dimstyle" "TEST-123")) (command "dimstyle" "S" "TEST-123") ) ;; -------------------------------------- (if (not (tblsearch "STYLE" "TEST-100")) (command ".-style" "TEST-100" "Calibri" "0" "1" "0" "N" "N" "N") ) (setvar "DIMTOL" 1) (setvar "DIMTM" 0.05) (setvar "DIMTP" 0.05) (setvar "DIMTXSTY" "TEST-100") ;; Create or update dimension style (if (not (tblsearch "dimstyle" "DIM-100")) (progn (command ".-dimstyle" "S" "DIM-100") ) (command ".-dimstyle" "R" "DIM-100") ) ;; -------------------------------------- (if (not (tblsearch "STYLE" "TEST-200")) (command ".-style" "TEST-200" "ARIAL" "0" "1" "0" "N" "N" "N") ) (setvar "DIMTOL" 1) (setvar "DIMTM" 0.10) (setvar "DIMTP" 0.10) (setvar "DIMTXSTY" "TEST-200") (if (not (tblsearch "dimstyle" "DIM-200")) (progn (command ".-dimstyle" "S" "DIM-200") ) (command ".-dimstyle" "R" "DIM-200") ) (command "undo" "e") (alert "\nPrompt:\nDimension style creation completed!\n") (princ) ) OPT-2 THIS OPTION TEXT STYLE NOT CRETED IN ANNOTATIVE STYLE AND ONE MORE QUERT I WANT TEST-123 IS NORMAL DIM STYLE (defun c:TEST (/ oldcmdecho oldexpert) (setq oldcmdecho (getvar "cmdecho") oldexpert (getvar "expert")) (setvar "cmdecho" 0) (setvar "expert" 5) (command "_.undo" "_begin") (if (not (tblsearch "STYLE" "Standard")) (command "_.-style" "Standard" "txt" "2.5" "" "" "" "") ) (if (not (tblsearch "STYLE" "TEST-100")) (command "_.-style" "TEST-100" "Calibri" "2.5" "" "" "" "") ) (if (not (tblsearch "STYLE" "TEST-200")) (command "_.-style" "TEST-200" "Arial" "2.5" "" "" "" "") ) (while (> (getvar "cmdactive") 0) (command "")) (if (not (tblsearch "DIMSTYLE" "TEST-123")) (progn (setvar "DIMTOL" 0) (setvar "DIMTXSTY" "Standard") (command "_.-dimstyle" "_S" "TEST-123") (while (> (getvar "cmdactive") 0) (command "")) ) ) (if (not (tblsearch "DIMSTYLE" "DIM-100")) (progn (setvar "DIMTOL" 1) (setvar "DIMTM" 0.05) (setvar "DIMTP" 0.05) (setvar "DIMTXSTY" "TEST-100") (setvar "DIMTDEC" 2) (command "_.-dimstyle" "_S" "DIM-100") (while (> (getvar "cmdactive") 0) (command "")) ) ) ;; DIM-200 - With tolerances (if (not (tblsearch "DIMSTYLE" "DIM-200")) (progn (setvar "DIMTOL" 1) (setvar "DIMTM" 0.10) (setvar "DIMTP" 0.10) (setvar "DIMTXSTY" "TEST-200") (setvar "DIMTDEC" 2) (command "_.-dimstyle" "_S" "DIM-200") (while (> (getvar "cmdactive") 0) (command "")) ) ) (command "_.undo" "_end") (setvar "cmdecho" oldcmdecho) (setvar "expert" oldexpert) (princ "\nTEST command completed successfully!") (princ) ) Edited 17 hours ago by sachindkini Quote
BIGAL Posted 16 hours ago Posted 16 hours ago I think you need to look at Entmake a style whether its a text style or a dimension style rather than trying to override current settings. trying to find a good simple example some else may have one. Quote
mhupp Posted 10 hours ago Posted 10 hours ago Entmake text style. (entmake '((0 . "STYLE") (100 . "AcDbSymbolTableRecord") (100 . "AcDbTextStyleTableRecord") (2 . "style name here") (70 . 0) (40 . 0.0) (41 . 1.0) (50 . 0.0) (71 . 0) (42 . 1.0) (3 . "Arial.ttf") (4 . "") ) ) use setvar for dimstyles nothing will be outputted to command prompt. (setvar 'DIMADEC 2) (setvar 'DIMALT "off") I think @Steven P has dug into this more. 1 Quote
Steven P Posted 2 hours ago Posted 2 hours ago I don't tend to annotative dims as much as perhaps I should but will see what I can dig out Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.