samifox Posted February 23, 2013 Posted February 23, 2013 Hi I want to compose autolisp to Offset x units and move the offseted objects to y layer. Thanks Shay Quote
MSasu Posted February 23, 2013 Posted February 23, 2013 You may start something from the code on this previous thread. Quote
samifox Posted February 23, 2013 Author Posted February 23, 2013 this thread is over my understanding as im totaly new to autolisp (but i do have expirience in other languages) ive come across this code but i hardly understand it i add comments wtih questions (defun c:test (/ n ss p e); 1. what the switch / means? (if (and (setq n (getdist "\n Specify the Offset Distance :"));2.what the use of "and" here? (setq ss (ssget "_+.:S:L" '((0 . "*POLYLINE,*LINE,CIRCLE,ELLIPSE")));3. select all polys,line,circle,elipse andd put them in ss variable? ) (setq p (getpoint "\n Specify point :")) ) (progn (command "_.offset" n ss "_non" p "");4.offset all shapes? (setq e (entlast)) (if (tblsearch "LAYER" "cover");.5??? (command "_.chprop" e "" "_layer" "cover" "");.6??? ) ) (princ) ) (princ) ) Thanks S Quote
BIGAL Posted February 23, 2013 Posted February 23, 2013 1 set local variables so not left in meory (a b / c d e) a b stay as variables in memory 2 use and as a test for user input 3 select all objects 4 offest all objects 5 check layer cover exists if not make 6 make layer see 6 7 (princ) at end exit quitely get messages other wise on screen 8 ss selection set can be anything you like "mylist" Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.