DIM: HOW TO FAST CHANGING THE PRECISION OF THE DECIMALS SHOWN

Well, dear "collegues", I try to explain in english to get help, kindly:
I used after the selection of a quota, pressing the right mouse button to see a menu of choice for changing the precision (but also the location and style by choosing from among those now in use) of the shares.
The menu shows instead the choice to select the corresponding commands on the same bar the units, but -however- without any real rapid selection or change.
Especially, to change the precision (the number of decimal places shown) none shortcut there is but should find it later in the Properties window.
Generally within a dimensional drawing, there are different styles but you still need to modify some dimensions -fast- without having to create a new style to go and then again select ...
With BC does not seem possible (but on my old AUTOCAD2000LT yes), does anyone know how to personalize the right-mouse-menu to include this handy feature?
Should I need to use yet AC2000LT to improve my jobs?!
Thanks

Comments

  • In autocad you can select a dimension, right click and in the context menu have the option to change the precision of the dimension - change the value of the DIMDEC variable for the dimension or DIMADEC for angular dimensions.  Currently, I do not see the option in the right click menu; I do not know how to add to the right click menu, but I would imagine that a macro could be written to do so...

  • Olivio, don't dispair...

    If I understood you right, you want to override the precision (or rounding?) of dimension objects via the contextmenu;
    this can be achieved easily:

    1.) open the customization dialog (Tools>cutomize) and select the 'Menu' Tab
    2.) scroll down to the context menu settings and unfold the 'Dimension Object' context menu
    3.) select the item that you want to precede with your new command, press the right mouse button and choose 'new item' from the pop-up menu
    4.) in the dialog that opens, select
    - Create new tool
    - Toolbox: Dimensions
    - Title: Round to 0.1
    - Help: Overrides the dimrnd variable
    - Command: ^c^c_dimoverride;dimrnd;0.1;;
    and press OK
    5.) unfold the Dimension Objects' context menu (I bet you want to be able to change more than one dimension at a time)
    6.) select the item that you want to precede with your new command, press the right mouse button and choose 'Select available tool'
    7.) unfold the 'Dimensions' section, select the tool you just created and dismiss all dialogs with OK

    If you want to override the precision rather than the rounding, replace 'dimrnd' by 'dimdec'.

  • Hi Olivio,

    I have a written a Lisp routine that will do this task. Like Knut it uses ._DIMOVERRIDE to change the _DIMDEC, or _DIMADEC for the selected dimensions. It is a little more involved to setup, however I have included it in a sample Bricscad CAD Library, which you can download the Resources section of my site.

    There are three things required.

    First requirement is the DIMPREC Lisp routine. This is the function to update the precision of selected dimensions.

     

    ;------------------------------------------------------------------------------
    ; CAD Concepts Limited
    ;
    ; DIMENSION PRECISION
    ;
    ; Copyright (C) 2011 CAD Concepts Limited.
    ; This application by CAD Concepts Ltd is licensed under
    ; a Creative Commons Attribution-ShareAlike 3.0 Unported License.
    ; http://creativecommons.org/licenses/by-sa/3.0/nz/deed.en
    ; For options available to you under this license.

    ; This software is provided "as is". No liability is taken of
    ; FITNESS FOR ANY PARTICULAR PURPOSE.
    ;------------------------------------------------------------------------------
    ; File : Dimprec.lsp
    ; Author : Jason Bourhill
    ; Email : jason@cadconcepts.co.nz
    ; Web : http://www.cadconcepts.co.nz
    ; Date : 15/Oct/2011
    ; CAD Ver(s) : Tested on AutoCAD 2010 & Bricscad V11
    ; Purpose : Overriding the Precision (number of decimal places) of dimensions
    ;
    ; Usage : To load type (load "DIMPREC.LSP") from the command line or drag
    ; and drop the file onto your drawing using explorer.
    ; To run the routine type DIMPREC at the command line.
    ;
    ; Select DIMENSIONS on your drawing. Enter the angle
    ; to rotate the view relative to the current view angle.
    ;
    ; Requires : Nothing else
    ;------------------------------------------------------------------------------

    (defun C:DIMPREC ( / ASK sset flag)
    ;ASK
    ;This routine allows default prompt issuing
    (defun ASK (typ prmpt def / val vt)
    (setq vt (type def))
    (cond ((null vt) (princ (strcat prmpt ": ")))
    ((= vt 'STR) (princ (strcat prmpt " <" def ">: ")))
    ((= typ 'ANG) (princ (strcat prmpt " <" (rtd def) ">: ")))
    ((= vt 'REAL) (princ (strcat prmpt " <" (rtos def 2 2) ">: ")))
    ((= vt 'INT) (princ (strcat prmpt " <" (itoa def) ">: ")))
    )
    (cond ((= typ 'R) (setq val (getreal)))
    ((= typ 'S) (setq val (getkword)))
    ((= typ 'ANG) (setq val (getangle)))
    ((= typ 'DIST) (setq val (getdist)))
    ((= typ 'INT) (setq val (getint)))
    ((= typ 'STR) (setq val (getstring)))
    ((= typ 'STRT)(setq val (getstring T)))
    )
    (if (or (= val "")(= val ())) def val)
    ) ; end ASK

    ;Main Function
    (princ "\nSelect DIMENSIONS to change the precision of ") ; prompt user
    (setq sset (ssget '((0 . "DIMENSION")))) ; Create a selection selection filtering to select dimensions only
    (if sset ; if Dimensions have been selected
    (progn ; then
    (if (not newdimprec) (setq newdimprec (getvar "_DIMDEC"))) ; if a dim precision hasn't been set, then set it to the current DIMDEC value. This is a bit of cheat as it ignores DIMADEC, which is used by angles
    (setq flag nil) ; set the flag to nil
    (while (not flag) ; while we don't get a valid precision (must be between 0 - 8) loop
    (setq newdimprec (ask 'INT "Enter number of decimal places (0 to 8)" newdimprec)) ; ask user for precision
    (if (and (>= newdimprec 0)(<= newdimprec 8)) ; check if the value is between 0 & 8
    (setq flag 'T) ; If it is set flag to true
    (progn ; else
    (setq newdimprec (getvar "_DIMDEC")) ; reset the precision to default
    (princ "\nPrecision value must be between 0 and 8. Please try again\n") ; tell the user what is required
    ); end else
    ); end if
    ); end while
    (if flag
    (progn
    (setvar "CMDECHO" 0)
    (command "._DIMOVERRIDE" "_DIMDEC" newdimprec "_DIMADEC" newdimprec "" sset "") ; override dimprecision for selected DIMENSIONS
    (setvar "CMDECHO" 1)
    )
    )
    )
    (princ "\nNo DIMENSIONS selected ") ; Else prompt user that nothing has been done
    ); end if
    (prin1) ; make a quiet exit
    ) ; end DIMPREC

     

    Second requirement is to set your on_doc_load.lsp to Autoload this routine when called:

     

    ; ON_DOC_LOAD. Loads Automatically each time a drawing is opened.
    ;
    ; Begin External Programs
    ; The following are a Stub that loads the full function
    ; the first time it is required. Done to save memory
    (autoload "dimprec.lsp" '("DIMPREC")) ; Change the precision (No. decimal places) of dimensions.

    Third Requirement is to customise your context menu to call the dimprec function.

    Under 'Dimension Object' in the context menu create a new tool (see Knuts description it's more detailed than mine)

    - Title: 0

    - Help: 0 Decimal Places

    - Command: ^c^cdimprec 0

    Note you will need to repeat this for the 'Dimension Objects' context menu, which is for multiple dimension selections

     

     

    Regards,

    Jason Bourhill

    CAD Concepts

     

  • Thanks very much to all everyone, just I will able to save some "minutes" from my job, I would like to try your solutions.

    Greetings

  • Well, goodmorning!
    Unfortunately "my" italian BC (V11) does not recognize te commands "dimoverride" and "dimover", with or without the previus underscore, capital or not... the guide reports the same comands but these don't work.
    Now i ask to the Italian support to verify it.

  • Hmmm, very strange...

    try ._dimoverride, for the unlikely case that a loaded application has undefined the command.

  • It should work??

    CAD Forum has localised names for commands. http://cadforum.cz/cadforum_en/command.asp?cmd=DIMOVERRIDE you could try substituting the Italian version of the command. The other thing to check is the variables _DIMDEC and _DIMADEC, maybe they are to blame. Either try without the underscore "_", or try the Italian version.

     

    Regards,

    Jason Bourhill

    CAD Concepts

  • ...dear, I have jus asked the It. Support.
    I also tried :
    ": _dimoverride
    Impossibile riconoscere il comando "DIMOVERRIDE". Per favore prova di nuovo. "

    ": ._dimoverride
    Impossibile riconoscere il comando "DIMOVERRIDE". Per favore prova di nuovo. "

    Also I serched the italian list command but several command and variables are the same of english and the command as you both shown in your kindly reply is the same in the semi-translated italian guide.
    The variable DIMDEC and DIMADEC (without or with previous underscore) works.
    Only (may be) DIMOVERRIDE and DIMOVER don't are recognized.
    Now I am waiting the support's help.
    Thanks again.

  • ...forthemore:
    The translated command as shown in the site cadforum that report DIMOVERRIDE = DIMMODILOCALE works also but not equal!
    That is the DIMMODILOCALE command "answer" as to write _DIMLINEAR !!!

    example:
    : dimmodilocale
    INVIO per selezionare entità/<Origine prima linea di estensione>:
    Origine seconda linea di estensione:
    Angolo/Testo/Orizzontale/Verticale/Ruotato:
    Testo quota = 383.5

    ....bah

  • Hi Olivio,

    Maybe we can use DIMSTYLE instead. A bit long winded, but you can change DIMDEC and DIMADEC, apply the changes to your dimensions using DIMSTYLE, then again using DIMSTYLE you can restore the style to its previous settings. If so then the modified routine should work for you until you get a fix:

     

    ;------------------------------------------------------------------------------
    ; CAD Concepts Limited
    ;
    ; DIMENSION PRECISION
    ;
    ; Copyright (C) 2011 CAD Concepts Limited.
    ; This application by CAD Concepts Ltd is licensed under
    ; a Creative Commons Attribution-ShareAlike 3.0 Unported License.
    ; http://creativecommons.org/licenses/by-sa/3.0/nz/deed.en
    ; For options available to you under this license.

    ; This software is provided "as is". No liability is taken of
    ; FITNESS FOR ANY PARTICULAR PURPOSE.
    ;------------------------------------------------------------------------------
    ; File : Dimprec2.lsp
    ; Author : Jason Bourhill
    ; Email : jason@cadconcepts.co.nz
    ; Web : http://www.cadconcepts.co.nz
    ; Date : 15/Oct/2011
    ; CAD Ver(s) : Tested on AutoCAD 2010 & Bricscad V11
    ; Purpose : Overriding the Precision (number of decimal places) of dimensions
    ;
    ; Usage : To load type (load "DIMPREC.LSP") from the command line or drag
    ; and drop the file onto your drawing using explorer.
    ; To run the routine type DIMPREC at the command line.
    ;
    ; Select DIMENSIONS on your drawing. Enter the angle
    ; to rotate the view relative to the current view angle.
    ;
    ; Requires : Nothing else
    ;------------------------------------------------------------------------------
    ; Rev no : B
    ; Reason : DIMOVERRIDE doesn't work in the Italian version
    ; Rev Date : 18/OCT/2011
    ; Rev by : Jason Bourhill
    ; Email : jason@cadconcepts.co.nz
    ;
    ; Description:
    ; Modified to use DIMSTYLE instead of DIMOVERRIDE
    ; also (setvar _DIMADEC myint) doesn't work, but (setvar DIMADEC myint) does.
    ; So removed underscores from system variables.
    ;------------------------------------------------------------------------------

    ; *ERROR*
    ; Error handle should anything go wrong (HA! as if)

    (defun dim_error (er)
    (if curdimstyle
    (progn
    (command "._DIMSTYLE" "R" curdimstyle) ; reset the dimstyle to the saved one
    (setq curdimstyle nil)
    )
    )
    (cond ((eq er "console break") (gsvar "T"))
    ((eq er "Function cancelled") (gsvar "T"))
    ((eq er ())(gsvar "T"))
    (T (princ (strcat "ERROR: " er )) (gsvar "T"))
    )
    (setq *error* olderr) ; reset the error handler to the original
    (prin1)
    )

    ; GSVAR
    ; This routine allows you to save a list of variables before you
    ; change them and then resets them after its completed.

    ; To save vars present a list of the vars to save
    ; eg: (gsvar '("cmdecho" "expert" "blipmode"))

    ; To reset the vars back after running your routine simply pass a
    ; string to GSVAR
    ; eg: (gsvar "T")

    (defun GSVAR (var / e_var s_val num)
    (cond ((= 'LIST (type var)) ; if you pass a list it will save the variables
    (setq v_lst ())
    (foreach e_var var
    (setq s_val (list e_var (getvar e_var))
    v_lst (cons s_val v_lst)
    )
    )
    )
    ((= 'STR (type var)) ; if you pass a string it will reset the variables
    (setq num 0) ; counter
    (repeat (length v_lst) ; repeats for the length of the list
    (setvar (car (nth num v_lst)) (cadr (nth num v_lst))) ; resets the variable
    (setq num (1+ num))
    )
    (setq v_lst ()) ; resets the variable list to nil
    )
    (T (princ "\nWrong syntax buddy!!"))
    )
    (prin1)
    )

    (defun C:DIMPREC ( / ASK sset flag)
    ;ASK
    ;This routine allows default prompt issuing
    (defun ASK (typ prmpt def / val vt)
    (setq vt (type def))
    (cond ((null vt) (princ (strcat prmpt ": ")))
    ((= vt 'STR) (princ (strcat prmpt " <" def ">: ")))
    ((= typ 'ANG) (princ (strcat prmpt " <" (rtd def) ">: ")))
    ((= vt 'REAL) (princ (strcat prmpt " <" (rtos def 2 2) ">: ")))
    ((= vt 'INT) (princ (strcat prmpt " <" (itoa def) ">: ")))
    )
    (cond ((= typ 'R) (setq val (getreal)))
    ((= typ 'S) (setq val (getkword)))
    ((= typ 'ANG) (setq val (getangle)))
    ((= typ 'DIST) (setq val (getdist)))
    ((= typ 'INT) (setq val (getint)))
    ((= typ 'STR) (setq val (getstring)))
    ((= typ 'STRT)(setq val (getstring T)))
    )
    (if (or (= val "")(= val ())) def val)
    ) ; end ASK

    ;Main Function
    (setq olderr *error* *error* dim_error) ; save the current *error* function and substitute with mine
    (gsvar '("cmdecho")) ; save system variables
    (setvar "CMDECHO" 0) ; turn off command echo
    (princ "\nSelect DIMENSIONS to change the precision of ") ; prompt user
    (setq sset (ssget '((0 . "DIMENSION")))) ; Create a selection selection filtering to select dimensions only
    (if sset ; if Dimensions have been selected
    (progn ; then
    (if (not newdimprec) (setq newdimprec (getvar "DIMDEC"))) ; if a dim precision hasn't been set, then set it to the current DIMDEC value. This is a bit of cheat as it ignores DIMADEC, which is used by angles
    (setq flag nil) ; set the flag to nil
    (while (not flag) ; while we don't get a valid precision (must be between 0 - 8) loop
    (setq newdimprec (ask 'INT "Enter number of decimal places (0 to 8)" newdimprec)) ; ask user for precision
    (if (and (>= newdimprec 0)(<= newdimprec 8)) ; check if the value is between 0 & 8
    (setq flag 'T) ; If it is set flag to true
    (progn ; else
    (setq newdimprec (getvar "DIMDEC")) ; reset the precision to default
    (princ "\nPrecision value must be between 0 and 8. Please try again\n") ; tell the user what is required
    ); end else
    ); end if
    ); end while
    (if flag
    (progn
    (setq curdimstyle (getvar "DIMSTYLE")) ; save the current dimstyle
    (setvar "DIMDEC" newdimprec) ; set dimdec to entered value
    (setvar "DIMADEC" newdimprec) ; set dimadec to entered value
    (command "._DIMSTYLE" "A" sset "") ; override dimprecision for selected DIMENSIONS
    (command "._DIMSTYLE" "R" curdimstyle) ; reset the dimstyle to the saved one
    (setq curdimstyle nil)
    )
    )
    )
    (princ "\nNo DIMENSIONS selected ") ; Else prompt user that nothing has been done
    ); end if
    (gsvar "T") ; reset system variables
    (*error* nil) ; reset error handler
    (prin1) ; make a quiet exit
    ) ; end DIMPREC

    Note if you want to look at the command line version of DIMSTYLE type '_-DIMSTYLE'

     

    Hope that this works.

     

    Regards,

    Jason Bourhill

    CAD Concepts

  • Thanks Jason, but the support has just reported me: "Confermo quanto da lei segnalato.
    Provvederemo quanto prima a pubblicare un aggiornamento..."
    That is : "I confirm what you reported. We will publish an update as soon as possible..."

     

  • Oh yes, such nuisances made me switch to non-localised software years ago...

  • Well, I have just downloaded the revision of IT version... now the sw recognize the standard _DIMOVERRIDE and also the Italian match _DIMMODILOCALE... yes it does (yes does corretly)the command trought the menu personalized but it reports however on the line: "Impossibile riconoscere il comando "DIMMODILOCALE". Per favore prova di nuovo." (!!!) ...
    I am tired (bored) a lot but also satisfied! Thank to everyone helped me...

     

  • Ok! writing directly on the line command: dimmodilocale or _dimmodilocale there are not problems; instead trought the menu personalized it need without underscore... but however it does!

This discussion has been closed.