Print Page | Close Window

help w/layer creation lisp

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DXF formats, Design Review, AutoCAD web, Drive, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=610
Printed Date: 11.Jun.2026 at 22:48


Topic: help w/layer creation lisp
Posted By: brenth
Subject: help w/layer creation lisp
Date Posted: 03.Apr.2008 at 19:41
I am trying to figure out how to add an if condition to the following lisp routine:
 
     ; LAYER SETUP
     ;
(defun C:CHECKLA (HDNAME HDCOLOR HDLTTYPE)
  (command "cmdecho" "0")
     ;  (if (= (tblsearch "layer" hdname) nil)
  (command "layer" "m" HDNAME "c" HDCOLOR "" "lt" HDLTTYPE "" ""
   )
  (command "layer" "s" HDNAME "")
     ;  )
)
 
 
This routine creates a new layer in the drawing when the user selects the layer name from a pulldown menu. variables are set for HDNAME, HDCOLOR AND HDLTTYPE. I want to add a conditon where if HDNAME is equivalant to C-BORDER or BORDER, then the new layer is turned to a non-plot layer.
 
Any help is appreciated
 
Also If anyone can suggest a website, or book that is a dictionary of lisp commands I would love to get ahold of that info
 
Thanks



Replies:
Posted By: Arben.Allaraj
Date Posted: 04.Apr.2008 at 12:14
 
 CHECK  FOR  HELP ABOUT  PROGRAMMING TO AUGI.COM.
 YOU  CAN SEE A GOOD WEB ABOUT LISP.
  http://www.afralisp.net/lisp - http://www.afralisp.net/lisp


-------------
Ing Arben.Allaraj
http://cad-drafting-corner.blogspot.com



Print Page | Close Window