Is your stated version (2000i) an older LT version? Is it LISP capable?

Registered forum members do not see this ad.
Hi All
Does any one have a Lisp routine to turn the diagonal line that chamfer creates to the current layer instead of the original layer of the lines? I would appreciate any help.
Thanks
Brian
Is your stated version (2000i) an older LT version? Is it LISP capable?
DropBox | finding the light...
Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak...

We use 2000i and 2012
Code:(defun c:Chamfer2 (/ ent) (setq ent (entlast)) (command "_.chamfer") (while (eq (logand 1 (getvar 'CMDACTIVE)) 1) (command PAUSE)) (if (not (equal ent (setq ent (entlast)))) (entmod (list (cons 8 (getvar 'CLAYER)) (cons -1 ent))) ) (princ) )
DropBox | finding the light...
Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak...

Thanks that is exactly what i was looking for...
You're welcome.
DropBox | finding the light...
Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak...
But when chamfering a Polyline object while Trimmode variable is set to zero, there may be more than one object as the result of CHAMFER.
For this case alanjt's nice code can be edited to:
Code:(defun c:Chamfer2 (/ ent) (setq ent (entlast)) (command "_.chamfer") (while (eq (logand 1 (getvar 'CMDACTIVE)) 1) (command PAUSE)) (while (setq ent (entnext ent)) (entmod (list (cons 8 (getvar 'CLAYER)) (cons -1 ent))) ) (princ) )
Mehrdad Ahankhah مهرداد آهن خواه
www.IranCAD.com
Be careful when 'entlast' is an Attribute Block or Polyline.![]()
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper
Registered forum members do not see this ad.
I checked Polyline and it doesn't cause any error on VERTEX and SEQUEND objects, but changes ATTRIB objects. So the code can be edited to this one:
Code:(defun c:Chamfer2 (/ ent) (setq ent (entlast)) (command "_.chamfer") (while (eq (logand 1 (getvar 'CMDACTIVE)) 1) (command PAUSE)) (while (setq ent (entnext ent)) (or (member (cdr (assoc 0 (entget ent))) '("ATTRIB" "VERTEX" "SEQUEND")) (entmod (list (cons 8 (getvar 'CLAYER)) (cons -1 ent))) ) ) (princ) )
Mehrdad Ahankhah مهرداد آهن خواه
www.IranCAD.com
Bookmarks