multiple offset

multiple offset

Anonymous
Not applicable
648 Views
1 Reply
Message 1 of 2

multiple offset

Anonymous
Not applicable

hi guys, 

i found a lisp that allows me to select many objects at the same time (not only one object) and make offset to them 

it saved for me much time and effort

i really need to know how it was done , i want to make a lisp for my own for different kind of stuff like fillet and chamfer , i had read alot about autolisp programming but still cant reach my goal 

can anyone please tell me a simple code for this kind of action ?? 

0 Likes
649 Views
1 Reply
Reply (1)
Message 2 of 2

ВeekeeCZ
Consultant
Consultant

There is really not any simple trick. Just learn from your experience. Start with simple one, then move on.

Here you have an example of very simple Offset Multiple LISP:

 

(defun c:OffsetMultiple (/  ss i entity pnt dst)
 
  (if (and (setq ss (ssget '((0 . "LINE")))) ; select a group of line
           (setq pnt (getpoint "\nPick a side: "))  ; and side
           (setq dst (getreal "\nSet distance: "))  ; and distance
           )
    (repeat (setq i (sslength ss))		; go thru that group as many times as members have
      (setq entity (ssname ss (setq i (1- i)))) ; get entity 
      (command "_.OFFSET" dst entity "_none" pnt ""))) ; use if for offset
  (princ)
  )

Go thru it, function by function, use HELP

Good luck.

0 Likes