Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/04/2022 in all areas

  1. Hi, I'm asking if there Is a Lisp to make Ncopy Command use the current layer to bring the Copied objects in to it automatically Thanks in advance
    1 point
  2. 1 point
  3. Here's another thought to exclude a picked item type: (defun c:foo (/ a e f s) (cond ((setq e (car (entsel "\nPick something to exclude: "))) (setq f "*TEXT,LEADER,MULTILEADER,DIMENSION") (setq a (cdr (assoc 0 (entget e)))) (sssetfirst nil (ssget "_A" (list (cons 0 (if (wcmatch a "*TEXT") (vl-string-subst "~*TEXT" "*TEXT" f) (vl-string-subst (strcat "~" a) a f) ) ) ) ) ) ) ) (princ) )
    1 point
  4. Try (defun c:ncl ( / ent elist clayer) (setq ent (entlast)) (command "_.ncopy" "\\" "" "_non" '(0 0) "_non" '(0 0)) (while (/= (entlast) ent) (setq ent (entlast) elist (entget ent) elist (entget (entlast)) elist (subst (cons 8 (getvar 'clayer))(assoc 8 elist) elist)) (entmod elist) (command "_.ncopy" "\\" "" "_non" '(0 0) "_non" '(0 0)) ) (princ) )
    1 point
  5. Did you follow the link given? All the information is given, but needs to be read.
    1 point
  6. NCOPY (Command) https://help.autodesk.com/view/ACD/2022/ENU/?guid=GUID-12FCCFDF-9B3B-48D0-AC46-DF1D3519B0E5 Many of the original Bonus or Express Tools are simply AutoCAD commands now. Those that are still lisp are only autoloaded with the command names. To use (c:xxxxx) you would have to preload the lisp before calling it. This may help:
    1 point
  7. Would it need to be (command "ncopy") rather than (c:ncopy) if it is a normal command rather than LISP command? For me after that it is saying "expects a point or settings"
    1 point
  8. COPYTOLAYER Didn't realize n was for nested. ;Nested Copy to current Layer (defun C:NCL (/ LastEnt SS en) (setq LastEnt (entlast)) (C:ncopy) (setq SS (ssadd)) (if (setq en (entnext LastEnt)) (while en (ssadd en SS) (setq en (entnext en)) ) ) (setvar 'cmdecho 0) (command "_.Chprop" SS "" "LA" (getvar 'clayer) "") (setvar 'cmdecho 1) )
    1 point
×
×
  • Create New...