stevesfr Posted July 1, 2011 Share Posted July 1, 2011 Can this be done globally through lisp? Say I have many short pieces of text in a drawing (at various Z values). How to insert an Acad point at the insertion point of these short texts. I'd like to put all the Acad points on one unique layer and do it globally... bam ! TIA for clues... Tried looking at LM point manager, but it does not address this issue. Steve Quote Link to comment Share on other sites More sharing options...
Tiger Posted July 1, 2011 Share Posted July 1, 2011 How about this thread? (just ignore the beer-talk) Quote Link to comment Share on other sites More sharing options...
David Bethel Posted July 1, 2011 Share Posted July 1, 2011 Steve, I'd start with something like this: [b][color=BLACK]([/color][/b]defun c:txt2pt [b][color=FUCHSIA]([/color][/b]/ ss en ed p10 p11 ip[b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]and [b][color=NAVY]([/color][/b]setq ss [b][color=MAROON]([/color][/b]ssget [color=#2f4f4f]"X"[/color] '[b][color=GREEN]([/color][/b][b][color=BLUE]([/color][/b]0 . [color=#2f4f4f]"TEXT"[/color][b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b] [color=#8b4513];;;ADD FILTERS AS NEEDED[/color] [b][color=NAVY]([/color][/b]while [b][color=MAROON]([/color][/b]setq en [b][color=GREEN]([/color][/b]ssname ss 0[b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [color=#8b4513];;;WHILE THERE IS A PICKSET[/color] [b][color=MAROON]([/color][/b]setq ed [b][color=GREEN]([/color][/b]entget en[b][color=GREEN])[/color][/b] [color=#8b4513];;;GET THE 1ST ENAME[/color] p10 [b][color=GREEN]([/color][/b]cdr [b][color=BLUE]([/color][/b]assoc 10 ed[b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b] [color=#8b4513];;;BASE POINT[/color] p11 [b][color=GREEN]([/color][/b]cdr [b][color=BLUE]([/color][/b]assoc 11 ed[b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b] [color=#8b4513];;;JUSTIFY POINT[/color] ip [b][color=GREEN]([/color][/b]if [b][color=BLUE]([/color][/b]or [b][color=RED]([/color][/b]> [b][color=PURPLE]([/color][/b]cdr [b][color=TEAL]([/color][/b]assoc 72 ed[b][color=TEAL])[/color][/b][b][color=PURPLE])[/color][/b] 0[b][color=RED])[/color][/b] [b][color=RED]([/color][/b]> [b][color=PURPLE]([/color][/b]cdr [b][color=TEAL]([/color][/b]assoc 73 ed[b][color=TEAL])[/color][/b][b][color=PURPLE])[/color][/b] 0[b][color=RED])[/color][/b][b][color=BLUE])[/color][/b] p11 p10[b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [color=#8b4513];;;DETERMINE THE INSERT POINT[/color] [b][color=MAROON]([/color][/b]entmake [b][color=GREEN]([/color][/b]list [b][color=BLUE]([/color][/b]cons 0 [color=#2f4f4f]"POINT"[/color][b][color=BLUE])[/color][/b] [color=#8b4513];;;ENTMAKE THE POINT[/color] [b][color=BLUE]([/color][/b]assoc 8 ed[b][color=BLUE])[/color][/b] [b][color=BLUE]([/color][/b]cons 10 [b][color=RED]([/color][/b]trans ip en 0[b][color=RED])[/color][/b][b][color=BLUE])[/color][/b] [b][color=BLUE]([/color][/b]assoc 210 ed[b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b] [color=#8b4513]; [b][color=MAROON]([/color][/b]entdel en[b][color=MAROON])[/color][/b] ;;;UNCOMMENT TO ERASE TEXT[/color] [b][color=MAROON]([/color][/b]ssdel en ss[b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [color=#8b4513];;;STEPS THRU THE PICKSET[/color] [b][color=FUCHSIA]([/color][/b]prin1[b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] You will need to tweak this to your needs ie change (assoc 8 ed) to (cons 8 "YourLayerName") Also this deals with simple text only. HTH -David Quote Link to comment Share on other sites More sharing options...
stevesfr Posted July 1, 2011 Author Share Posted July 1, 2011 How about this thread? (just ignore the beer-talk) Tiger - just what is needed........ many thanks and many beers !!! (hic) thanks also to Lee for its origin. Steve Quote Link to comment Share on other sites More sharing options...
stevesfr Posted July 1, 2011 Author Share Posted July 1, 2011 Thank you David, works just fine. Steve Quote Link to comment Share on other sites More sharing options...
BlackBox Posted July 1, 2011 Share Posted July 1, 2011 (edited) How about this thread? (just ignore the beer-talk) Tiger - just what is needed........ many thanks and many beers !!! (hic)thanks also to Lee for its origin. Steve Huh!? What!?? I've missed beer talk!??? ... Meh - "she who shall not be named" had to break up the brouhaha with the word sober. Not-exactly-what-I-want-to-read-before-Independence-Day-weekend. LoL ...Thank's a lot Debbie Downer. (^^ Sorry, I couldn't miss an opportunity to make a shameless plug for SNL - Ehhhehehehehehe ^^) Edited July 1, 2011 by BlackBox I always catch the typos AFTER I hit the button! Quote Link to comment Share on other sites More sharing options...
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.