Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/24/2022 in all areas

  1. Here is mine This allows you to just select with the mouse. and then prompts "Delete Contents and Layer: "layer name" [<Yes>/No]: " with the default answer being yes so you can just enter/right click. only changes current layer if its the one being deleted. ;;----------------------------------------------------------------------------;; ;; Delete everything on and the layer itself (defun c:Del-layer (/ lay SS rep e) (setq lay (cdr (assoc 8 (entget (car (entsel)))))) (setq SS (ssget "_X" (list (cons 8 lay)))) (sssetfirst nil ss) (initget "Yes No") (setq rep (cond ((getkword (strcat "\nDelete Layer \"" lay "\" & " (rtos (sslength ss) 2 0) " Entity's: [<Yes>/No]: "))) ("Yes") ) ) (cond ((= rep "Yes") (if (eq (getvar 'clayer) lay) (setvar 'clayer "0") ) (foreach ent (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) (vla-delete (vlax-ename->vla-object ent)) ;will delete even if in another paper space. ) (setq e (tblobjname "layer" lay)) (vla-delete (vlax-ename->vla-object e)) (prompt (strcat "\nLayer " lay " Deleted")) ) ) (princ) )
    1 point
  2. Copied this in the depths of time, sorry no reference to where it came from. This deletes and then purges all objects on a layer doing what you want so long as there are no elements for example in a block that are on the specified layer. Can change this to have an 'entsel' an entity and grab the layer name from using assoc and 8, though I am sure someone will have this all set up, this will give you a start (defun c:laydelLayerNamw (/ ent l_name ss cntr amt ssent) (setq MyLayer "LayuerName") (setvar 'clayer "0") (progn (setq ss (ssget "X" (list (cons 8 MyLayer))) ;; create a selection set of all entites on layer cntr (1- (sslength ss)) ;; set 'cntr' to number of items in selection set amt (itoa cntr) ;; make a string from an integer ) ;; does the sel set have anything in it (if (> cntr 1) (while (>= cntr 0) ;; as long as 'cntr' is greater than or equal to 0 keep looping (setq ssent (ssname ss cntr)) ;; extract the ename from the sel set (entdel ssent) ;; delete that entity (setq cntr (1- cntr)) ;; subtract 1 from cntr ) ) ) (command "zoom" "all" "zoom" ".95x") (command "_.purge" "LA" MyLayer "N") (princ (strcat "\nErased " amt " items")) (princ) )
    1 point
  3. Web server ? https://www.cadtutor.net/forum/topic/56527-connect-to-web-server-via-lisp/
    1 point
  4. The main idea is to be able to share a position of X and Y coordinates. Or geographic coordinates of latitude and longitude. Even a website. If I work with a georeferenced map, I have this information. And it would be interesting to be able to share it via whatsapp message.
    1 point
×
×
  • Create New...