Results 1 to 6 of 6

Thread: Changing Layer Key Overrides with VBA or Lisp

  1. #1
    100 Club jgardner.79905's Avatar
    Join Date
    2004-12
    Posts
    153
    Login to Give a bone
    0

    Angry Changing Layer Key Overrides with VBA or Lisp

    I am trying to create a routine in lisp routine or VBA that will change the Layer Key Override automatically (see picture below). However, I do not know how to get to that information, I also can not fine anything even close. I have figured out how to toggle the overrides on and off just not how to change what the override is. As an example I would like to be able to have the routine to change the “Location” field from one preset value to another. If anyone has any suggestions or now how I could get help with this, it would be greatly appreciated.
    Attached Images Attached Images

  2. #2
    I could stop if I wanted to
    Join Date
    2002-02
    Location
    Kansas
    Posts
    487
    Login to Give a bone
    0

    Default Re: Changing Layer Key Overrides with VBA or Lisp

    Use AECSETLAYERKEYOVERRIDE fuction this is a arx fuction.

    exp:
    Code:
     (AECSETLAYERKEYOVERRIDE "Minor" "Dims")

  3. #3
    100 Club jgardner.79905's Avatar
    Join Date
    2004-12
    Posts
    153
    Login to Give a bone
    0

    Question Re: Changing Layer Key Overrides with VBA or Lisp

    I am not real familiar with ARX functions in lisp could you please give a little more direction.

    Thanks
    Jason

  4. #4
    I could stop if I wanted to
    Join Date
    2002-02
    Location
    Kansas
    Posts
    487
    Login to Give a bone
    0

    Default Re: Changing Layer Key Overrides with VBA or Lisp

    ARX function is a function add to AutoLISP by a ARX program in this case the ARX program is ADT you use th function just like a AutoCAD function but if the ARX program is not loaded the function will not be there.

    Code:
     
    (AECSETLAYERKEYOVERRIDE "xxx" "yyy")
    so in your code call the function replace xxx with
    Location, Plan or Item

    replace yyy with the value you what it be set to

  5. #5
    I could stop if I wanted to
    Join Date
    2002-02
    Location
    Kansas
    Posts
    487
    Login to Give a bone
    0

    Default Re: Changing Layer Key Overrides with VBA or Lisp

    Put this code in a toolbar button
    Code:
    ^C^C(AECSETLAYERKEYOVERRIDE "Location" "yyy")
    replace "yyy" with new value for location

  6. #6
    100 Club jgardner.79905's Avatar
    Join Date
    2004-12
    Posts
    153
    Login to Give a bone
    0

    Thumbs up Re: Changing Layer Key Overrides with VBA or Lisp

    Worked like a champ, thanks again

    Jason

Similar Threads

  1. changing layer properties with lisp (line type)
    By maomuchmar in forum AutoLISP
    Replies: 7
    Last Post: 2014-06-23, 06:23 AM
  2. Replies: 7
    Last Post: 2014-05-08, 03:21 AM
  3. Changing Current Layer Should Reset Layer Overrides
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2010-09-21, 01:13 PM
  4. Changing Layer Key Overrides?
    By jgardner.79905 in forum AutoLISP
    Replies: 1
    Last Post: 2006-02-11, 08:11 AM
  5. Lisp for changing layer color in XREF's
    By cadd4la in forum AutoLISP
    Replies: 5
    Last Post: 2005-09-28, 01:16 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
  •