Results 1 to 2 of 2

Thread: First time trying to make a Lisp roustine and new user to AUGI

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2014-07
    Posts
    1
    Login to Give a bone
    0

    Default First time trying to make a Lisp roustine and new user to AUGI

    Could someone tell me what I need to do to make this simple lisp work? I'm wanting to freeze 5 specific layers and it's not working. The following is what I have:

    Code:
    (defun c:sdclf ()
     ;define the function
    ;********************************************************
     
     ;Save System Variables
     
     (setq oldsnap (getvar "osmode"))
     ;save snap settings
     
     (setq oldblipmode (getvar "blipmode"))
     ;save blipmode setting
     
    ;********************************************************
     ;Switch OFF System Variables
     
     (setvar "osmode" 0)
     ;Switch OFF snap
     
     (setvar "blipmode" 0)
     ;Switch OFF Blipmode
     
    ;********************************************************
    
      (command "-layer" "freeze")
     (setq layerList ("access" "area" "outline" "clearance" "defpoints"))
    ;**********************************************************
     
     ;Reset System Variable
     
     (setvar "osmode" oldsnap)
     ;Reset snap
     
     (setvar "blipmode" oldblipmode)
     ;Reset blipmode
     
    ;*********************************************************
     
     (princ)
     ;clean running
    ) ;end defun
    (princ)
    ;clean running
    Last edited by rkmcswain; 2014-07-07 at 09:11 PM. Reason: added [CODE] tags

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

    Default Re: First time trying to make a Lisp roustine and new user to AUGI

    The following will freeze the five layers only (I omitted the other stuff)

    Code:
    (defun c:foo ()
      (command ".-layer" "_F" "access,area,outline,clearance,defpoints")
    )
    Also, please enclose your code in [code] [/code] brackets for easier reading. Thanks.
    R.K. McSwain | CAD Panacea |

Similar Threads

  1. Replies: 3
    Last Post: 2012-05-07, 08:16 PM
  2. What time is it in AUGI-land?
    By MikeJarosz in forum VBA/COM Interop
    Replies: 10
    Last Post: 2007-10-09, 02:32 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
  •