TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: danglar on March 13, 2016, 03:13:53 AM

Title: Need help to combine two different routines into one program
Post by: danglar on March 13, 2016, 03:13:53 AM
I tried to combine two different routines into one program.
First routine align selected set of objects ( blocks and texts) along one X/Y/Z axis of a reference point and second one can rotate selected set of objects to
0 angle (see attached lisp)
I use a same set of objects for these routines and don't wont' to select objects twice..
I tried to use (ssget "L") function for second routine but something goes wrong..
Another question:
Is it possible to set different rotation angle for preselected set of entities by user prompt?
Any help will be very appreciated.
Title: Re: Need help to combine two different routines into one program
Post by: roy_043 on March 13, 2016, 05:49:53 AM
Try using (ssget "P"). See here (http://docs.autodesk.com/ACD/2011/ENU/filesALR/WS1a9193826455f5ff1a32d8d10ebc6b7ccc-693e.htm).
Title: Re: Need help to combine two different routines into one program
Post by: danglar on March 13, 2016, 09:17:55 AM
Thank you Roy_043.
Where I can put it?
I tried here:
(ssget "_:L" '((0 . "INSERT,MTEXT,MULTILEADER,TEXT")
and even here:
(setq ss (vla-get-activeselectionset *AcadDoc*)
but it's not help to me..
Title: Re: Need help to combine two different routines into one program
Post by: danglar on March 13, 2016, 09:30:33 AM
.. sorry I find my mistake:
 need to be:
(ssget "P" '((0 . "INSERT,MTEXT,MULTILEADER,TEXT")
thank you Roy!