Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/12/2020 in all areas

  1. Version 3. I need some help I know its a mapcar task but that's something I am not real good at. I have in past just used a get next and does not match, I am sure its been answered before but could not find. So I have a list ((layer entityname)(layer entityname)(layer entityname) ..) What I want is ((entityname entityname….)(entityname ….)(entityname ….)) so for this task have 3 layers and 14 entities the new list is 3 items entities by layer name (("0" <Entity name: 2279faf91f0>) ("0" <Entity name: 2279faf91e0>) ("0" <Entity name: 2279faf91d0>)………... (defun c:fbl2 ( / fr ent lyr rad ss a lst) (setq lst '()) (setq fr (getvar 'filletrad)) (initget 6) (setq rad (cond ( (getreal (strcat "\nEnter Fillet Radius <" (rtos fr) "> : "))) (fr))) (if (/= rad fr) (setvar 'filletrad rad)) (setq ss (ssget '((0 . "LINE")))) (setq lst '()) (repeat (setq x (sslength ss)) (setq ent (ssname ss (setq x (- x 1)))) (setq lay (cdr (assoc 8 (entget ent)))) (setq lst (cons (list lay ent) lst)) ) (setq lst (vl-sort lst '(lambda (x y) (< (car x)(car y))))) ; need new list here ; (foreach newlist make plines and fillet )
    1 point
  2. To auto plot a group of dwg's including one that is open even if it opens it will not be an updated version till you save or close. So close and run.
    1 point
  3. So you want pick all layers then do it ? (defun c:fbl ( / fr ent lyr rad ss a lst) (setq lst '()) (setq fr (getvar 'filletrad)) (setvar 'orthomode 0) (initget 6) (setq rad (cond ( (getreal (strcat "\nEnter Fillet Radius <" (rtos fr) "> : "))) (fr))) (if (/= rad fr) (setvar 'filletrad rad)) (while (setq ent (car (entsel "\nSelect Object on layer to fillet : "))) (setq lst (cons (cdr (assoc 8 (entget ent))) lst)) ) (setq pt1 (getpoint "Pick corner pt1")) (setq pt2 (getpoint pt1 "Pick corner pt2")) (repeat (setq x (length lst)) (setq lay (nth (setq x (- x 1)) lst)) (setq ss (ssget "w" pt1 pt2 (list (cons 8 lay)))) (command "pedit" (ssname ss 0) "_y" "_J" ss "" "") (setq ent (entlast)) (command "fillet" "_P" ent) ) (setvar 'filletrad fr) (princ) )
    1 point
  4. In a basic form try this (defun c:fbl ( / fr ent lyr pea rad ss a ) (setq fr (getvar 'filletrad) ent (car (entsel "\nSelect Object on layer to fillet : ")) lyr (cdr (assoc 8 (entget ent))) ) (cond ( (not (= 1 (getvar 'peditaccept))) (setq pea (getvar 'peditaccept)) (setvar 'peditaccept 1))) (initget 6) (setq rad (cond ( (getreal (strcat "\nEnter Fillet Radius <" (rtos fr) "> : "))) (fr))) (if (/= rad fr) (setvar 'filletrad rad)) (setq ss (ssget (list (cons 8 lyr))) a (ssname ss 0) ) (command "pedit" a "_J" ss "" "") (setq ent (entlast)) (command "fillet" "_P" ent) (command "explode" ent) (if pea (setvar 'peditaccept pea)) (setvar 'filletrad fr) (princ) )
    1 point
  5. I would suggest setting the regeneratetablesuppressed property to :vlax-true before modifying the table contents, and setting it back to :vlax-false when all operations have been performed.
    1 point
×
×
  • Create New...