See the top rated post in this thread. Click here

Results 1 to 6 of 6

Thread: DIMLAYER system variable not consistently working

  1. #1
    100 Club Brian C's Avatar
    Join Date
    2008-08
    Location
    Vancouver, BC
    Posts
    105
    Login to Give a bone
    0

    Default DIMLAYER system variable not consistently working

    There is a new system variable in AutoCAD 2016 called DIMLAYER, which when set to a layer name, it puts new dimensions on that layer automatically.

    When the command line DIM is used, the dimension goes on the layer specified. However, when the dimension is made with the traditional AutoCAD drop-down menu, or custom tool bars, it does not work, it goes on the current layer. Anyone else have this problem?
    Brian C
    *********
    "The difference is my flaws are personal. Yours are professional." [Col. Tigh, BSG 2004]

  2. #2
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,517
    Login to Give a bone
    1

    Default Re: DIMLAYER system variable not consistently working

    Quote Originally Posted by Brian C View Post
    There is a new system variable in AutoCAD 2016 called DIMLAYER, which when set to a layer name, it puts new dimensions on that layer automatically.

    When the command line DIM is used, the dimension goes on the layer specified. However, when the dimension is made with the traditional AutoCAD drop-down menu, or custom tool bars, it does not work, it goes on the current layer. Anyone else have this problem?
    By design, DIMLAYER is only observed using the DIM Command... This one of the many reasons I voted against this as a new feature, it's incomplete, and poorly implemented, IMHO.

    You'll need to roll your own Command Reactor, or .NET Event handler to filter for DIM* Commands, and either store CLAYER, set CLAYER == DIMLAYER, restore CLAYER when done, or retroactively apply DIMLAYER value to resultant Dimension-typed entities after-the-fact.

    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3620, Core i7-7700K 4.2GHz, 64GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

  3. #3
    Super Moderator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,673
    Login to Give a bone
    1

    Default Re: DIMLAYER system variable not consistently working

    That is as designed as far as I know. The old pull down menus are deprecated and were not updated to call the DIM command, and the now "classic" commands apparently do not honor the DIMLAYER sysvar.
    R.K. McSwain | CAD Panacea |

  4. #4
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,517
    Login to Give a bone
    1

    Default Re: DIMLAYER system variable not consistently working

    Quote Originally Posted by BlackBox View Post
    You'll need to roll your own Command Reactor, or .NET Event handler to filter for DIM* Commands, and either store CLAYER, set CLAYER == DIMLAYER, restore CLAYER when done, or retroactively apply DIMLAYER value to resultant Dimension-typed entities after-the-fact.


    FWIW -

    This is an 'annoauto' app I developed back in 2012, using .NET API to implement a Close() Method Override of an ObjectOverrule (thanks to Tony's help!):

    http://www.screencast.com/users/Blac...4-91cbf42be6c7
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3620, Core i7-7700K 4.2GHz, 64GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

  5. #5
    100 Club Brian C's Avatar
    Join Date
    2008-08
    Location
    Vancouver, BC
    Posts
    105
    Login to Give a bone
    0

    Default Re: DIMLAYER system variable not consistently working

    Thanks Blackbox and Rkm for the clarification. I have been using Autolisp for years to set CLAYER to the dimension layer, then set back to the previous layer after finishing dimensioning. I will look at the .NET app.
    Brian C
    *********
    "The difference is my flaws are personal. Yours are professional." [Col. Tigh, BSG 2004]

  6. #6
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,517
    Login to Give a bone
    0

    Default Re: DIMLAYER system variable not consistently working

    Quote Originally Posted by Brian C View Post
    I have been using Autolisp for years to set CLAYER to the dimension layer, then set back to the previous layer after finishing dimensioning.
    Then you're better prepared than most prior to DIMLAYER being introduced, and already equipped to handle the gaps for same; just keep using what you already have, if not enhance your existing code to now also account for DIM Command (+ DIMLAYER, in lieu of DIM* Commands + CLAYER, if that makes sense?).



    Quote Originally Posted by Brian C View Post
    I will look at the .NET app.
    No worries - basically, it's an MLEADER sample, that demonstrates the changing of MLeader's Style when layer is changed, and when the layer is changed as the Style is in kind, in order to easily adhere to standards. Same principle for Text, and Dimension entities.

    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3620, Core i7-7700K 4.2GHz, 64GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

Similar Threads

  1. CIVIL 3D SYSTEM VARIABLE
    By mwilson in forum AutoCAD Civil 3D - General
    Replies: 1
    Last Post: 2011-04-13, 06:47 PM
  2. Image Files created on a 32 bit system not working on a 64 bit system?
    By scott.epp in forum AutoCAD Civil 3D - General
    Replies: 0
    Last Post: 2010-10-05, 09:59 PM
  3. IMAGEFRAME System Variable
    By joeswantek in forum AutoCAD General
    Replies: 5
    Last Post: 2007-06-21, 05:11 PM
  4. Snap Overrides not working consistently
    By J. Grouchy in forum Revit Architecture - General
    Replies: 0
    Last Post: 2005-06-06, 03:15 PM
  5. System variable PSQUALITY
    By Phil Ferguson in forum AutoCAD General
    Replies: 1
    Last Post: 2005-01-29, 04:57 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
  •