Set to DIM layer Automatically

Discussion in 'AutoCAD' started by CADgurl, Jul 18, 2003.

  1. CADgurl

    CADgurl Guest

    Back when I was in school I heard of a lisp routine for when you began the Dimension command AutoCAD would automatically default to your dimension layer. Does anyone know where I can get that lisp routine? I think of it everytime I create Dimensions. Thanks in advance.

     
    CADgurl, Jul 18, 2003
    #1
  2. CADgurl

    pkirill Guest

    This is a basic routine I have used in the past. It's pretty old but it works - it stores your current layer, changes to the dim layer, runs the dim command, then puts you back on the original layer.  You can change the DIMLINEAR to DIMANG or whatever to control the different dim commands. And it can be modified to use just about any simple command.  Leaders are tougher - I have that around here somewhere.



     



    ;;DIML=DIMLINEAR - revised 6/22/00  MPK
    (DEFUN C:DIML()                         



    (defun *error* (msg)                    
    (princ "\n--->Back and forth, back and forth (sigh...)  ")     
    (setvar "clayer" l)                   



    (princ msg)                            
    (princ)   )                           
    (SETQ L (GETVAR "CLAYER"))                                  ;; assigns the current layer to the variable L
    (setvar "clayer" "05-DIMS")                                         ;; changes the current layer to DIM
    (COMMAND "DIMLINEAR" PAUSE PAUSE PAUSE)     ;; invokes the DIMLINEAR command and pauses for user input
    (setvar "clayer" l)                                                         ;; returns to the original layer
    (princ))



    "CADgurl" <> wrote in message news:...

    Back when I was in school I heard of a lisp routine for when you began the Dimension command AutoCAD would automatically default to your dimension layer. Does anyone know where I can get that lisp routine? I think of it everytime I create Dimensions. Thanks in advance.

     
    pkirill, Jul 18, 2003
    #2
  3. CADgurl

    hawkeye2 Guest

    As a macro associated with the dim button(s) I added the line: ^C^C -layer set "DIM". DIM is the name of my dimension layer.
     
    hawkeye2, Jul 22, 2003
    #3
  4. CADgurl

    CADgurl Guest

    I am not that familiar with lisp routines and have obviously made an error in trying to make this work. I cannot get this routine to work. It loads ok, it seems, but when I type the command an *error* command comes up. Thanks for the help anyhow, perhaps I will figure it out on my own. Any info would be greatly appreciated though if available. Thank You regardless.
    Lisa
     
    CADgurl, Jul 24, 2003
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.