Results 1 to 3 of 3

Thread: Coding help

  1. #1
    I could stop if I wanted to cadd4la's Avatar
    Join Date
    2001-12
    Location
    Newport Beach, CA
    Posts
    399
    Login to Give a bone
    0

    Question Coding help

    Looking for coding help.

    I need to have the code be able to turn off a group of layers (there is more then I am showing) that will sometimes have different names past the wildcard and may also not always have all the layers that are listed in the code. Finally, I need to be able to turn back on these layers.

    Thanks.

    Code:
    (DEFUN C:PHB0()(SETVAR "CMDECHO" 0)(COMMAND "LAYER" "OFF" "L-CALLOUTS*" "OFF" "L-
    
    TEXTS_CALLOUTS2*" "OFF" "L-TREES*", "OFF" "L-SHRUBS_CON*" """)(SETVAR "CMDECHO" 1)(princ))

  2. #2
    AUGI Addict
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: Coding help

    FYI:

    (command "_.-layer" "_off" "L-CALLOUTS*,L-TEXTS-CALLOUTS2,L-TREES*,L-SHRUBS_CON*" "")

  3. #3
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: Coding help

    Prior to running that code, save a layer state
    ...and then restore that layer state when you're done.

    Something like this...

    Code:
    (vl-cmdf "._layer" "_A" "_S" "temp" "" "" "")
    (do your stuff here)
    (vl-cmdf "._layer" "_A" "_R" "temp" "_D" "temp" "" "")
    R.K. McSwain | CAD Panacea |

Similar Threads

  1. Suggested Guidelines for Coding
    By peter in forum AutoLISP
    Replies: 12
    Last Post: 2015-07-27, 08:06 AM
  2. Coding help
    By cadd4la in forum AutoLISP
    Replies: 14
    Last Post: 2013-06-21, 05:20 PM
  3. Coding help.
    By cadd4la in forum AutoLISP
    Replies: 5
    Last Post: 2012-04-14, 02:58 AM
  4. CODING ELEMENTS
    By Steve Hutana in forum Revit - Platform
    Replies: 2
    Last Post: 2009-08-09, 08:42 PM
  5. Color Coding XYZ in iProperties Tab
    By inventor.wishlist1738 in forum Inventor Wish List
    Replies: 0
    Last Post: 2006-06-14, 04:07 AM

Posting Permissions

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