See the top rated post in this thread. Click here

Results 1 to 5 of 5

Thread: Dimension layer setting

  1. #1
    Member
    Join Date
    2003-06
    Posts
    2
    Login to Give a bone
    0

    Question Dimension layer setting

    In my dimension toolbar I set the layer to DIM so that all my dimensions are on the DIM layer.
    ^C^C-layer s dim;;_dimlinear
    How can you get it to automatically set it back to the layer it was working on ?

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,409
    Login to Give a bone
    0

    Default Re: Dimension layer setting

    Add the following code to your menu mnl or acaddoc.lsp.

    Code:
    ;;; CurrentLayer checks and sets current layer.
    ;;; argument is name of layer to check.
    ;;; "prevlay" stores the name of the current layer
    ;;; to be reset later
    (defun CurrentLayer (cl color /)
      (if (tblsearch "LAYER" cl)		;check to see if desired layer exists
        (progn				;if yes, then set to current
          (setq oLay (vla-item (vla-get-layers *CurDoc*) cl))
          (if (= (vlax-get-property oLay "Freeze") :vlax-True)
    	(vlax-put-property oLay "Freeze" :vlax-False)
          )
          (if (= (vlax-get-property oLay "LayerOn") :vlax-False)
    	(vlax-put-property oLay "LayerOn" :vlax-True)
          )
          (if (= (vlax-get-property oLay "Lock") :vlax-True)
    	(vlax-put-property oLay "Lock" :vlax-False)
          )
          (setq prevlay (getvar "clayer"))	;store current layer
          (setvar "clayer" cl)
        )
        (progn				;else make new and set to current
          (setq prevlay (getvar "clayer"))	;store current layer
          (command "-layer" "make" cl "color" color "" "")
        )
      )
    )
    ;;; RestorePrevLayer sets the current layer
    ;;; to the value stored in "prevlay"
    (defun RestorePrevLayer	()
      (setvar "clayer" prevlay)
    )
    Then, replace your menu macro with this: "^C^C(CurrentLayer "Dims" 82);_dimlinear;\\(RestorePrevLayer) ". Use whatever color number is standard for you.
    C:> ED WORKING....


    LinkedIn

  3. #3
    The Silent Type Mike.Perry's Avatar
    Join Date
    2000-11
    Posts
    13,656
    Login to Give a bone
    0

    Default Re: Dimension layer setting

    Hi

    To go with Ed's suggestion that can be found the AUGI Exchange, take a look at Peter Jamtgaard submission # EX001260 -

    AUGI Exchange Search Page

    Have a good one, Mike

  4. #4
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,409
    Login to Give a bone
    1

    Default Re: Dimension layer setting

    Come to think of it, I also had mine on there too.
    C:> ED WORKING....


    LinkedIn

  5. #5
    Member
    Join Date
    2003-06
    Posts
    2
    Login to Give a bone
    0

    Default Re: Dimension layer setting

    Thanks
    Stan.

Similar Threads

  1. Capable of setting dimension on Offset.
    By Wish List System in forum Inventor Wish List
    Replies: 0
    Last Post: 2012-11-14, 02:44 PM
  2. Dimension Separator Setting
    By BEN.CASTILLO in forum AutoCAD General
    Replies: 3
    Last Post: 2009-11-06, 07:14 PM
  3. Setting default dimension styles
    By rgarthe in forum Inventor - General
    Replies: 2
    Last Post: 2008-08-07, 10:47 PM
  4. 3D Layer Setting Default to 2D Layer Settings
    By civil3d.wishlist1941 in forum Civil 3D Wish List
    Replies: 0
    Last Post: 2008-05-22, 10:01 PM
  5. Setting up dimension to correct show whole feet
    By donny46137234 in forum AutoCAD General
    Replies: 6
    Last Post: 2007-04-10, 09:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •