Stephen Shafer Posted November 11, 2008 Posted November 11, 2008 Ok I searched around but apparently there is no right way to word this. Basically I have current AL to work with current blocks. I have a new customer who provides me with information I would normally have put into the block myself. What I would like to have happen is for something involving AutoLISP to take a piece of text and put that information into the current block, or something similar that the current AutoLISP can work with, so I can still gain the benefit of the customer providing me with this info now regards Quote
wizman Posted November 12, 2008 Posted November 12, 2008 mr. tony hotchkiss got at TEXT2ATT.LSP have a look at cadalyst.com Quote
Stephen Shafer Posted November 12, 2008 Author Posted November 12, 2008 Wisman, Thats a great start and thanks for the lead. That actually does a lot of what I need it to do. It looks exactly what i need to look like as well. The existing block has three attributes and this has one. Basically my current block has street name (which is derived by selecting the block of a current street name) and then the address and number of units. What I would like to do is select the street name, then a range of addresses (currently in text) and then have all this information placed in a block for each piece of text which would resemble my current block so that i can use yet another LISP on it. thanks Quote
wizman Posted November 13, 2008 Posted November 13, 2008 stephen could you please post a sample drawing with your block with attributes. so that guys here can take a look at your goal. Quote
cadplayer Posted May 25, 2011 Posted May 25, 2011 What are you trying to achieve cadplayer? I think it would be very nice to convert text in blocks with attribut. I doesn´t find this tool on cadalyst. Quote
Lee Mac Posted May 25, 2011 Posted May 25, 2011 I think it would be very nice to convert text in blocks with attribut. I doesn´t find this tool on cadalyst. Use BEDIT on the block, then use this to convert Text to Attribute Definitions: [color=GREEN];;-------------------=={ Text 2 Attribute }==-----------------;;[/color] [color=GREEN];; ;;[/color] [color=GREEN];; Converts single-line text to an attribute definition. ;;[/color] [color=GREEN];;------------------------------------------------------------;;[/color] [color=GREEN];; Author: Lee Mac, Copyright © 2011 - www.lee-mac.com ;;[/color] [color=GREEN];;------------------------------------------------------------;;[/color] ([color=BLUE]defun[/color] c:txt2att ( [color=BLUE]/[/color] el i ss st ) ([color=BLUE]vl-load-com[/color]) ([color=BLUE]if[/color] ([color=BLUE]setq[/color] ss ([color=BLUE]ssget[/color] [color=MAROON]"_:L"[/color] '((0 . [color=MAROON]"TEXT"[/color])))) ([color=BLUE]repeat[/color] ([color=BLUE]setq[/color] i ([color=BLUE]sslength[/color] ss)) ([color=BLUE]setq[/color] el ([color=BLUE]entget[/color] ([color=BLUE]ssname[/color] ss ([color=BLUE]setq[/color] i ([color=BLUE]1-[/color] i)))) st ([color=BLUE]vl-string-translate[/color] [color=MAROON]" "[/color] [color=MAROON]"_"[/color] ([color=BLUE]cdr[/color] ([color=BLUE]assoc[/color] 1 el))) ) ([color=BLUE]if[/color] ([color=BLUE]entmakex[/color] ([color=BLUE]append[/color] '((0 . [color=MAROON]"ATTDEF"[/color])) ([color=BLUE]vl-remove-if[/color] '([color=BLUE]lambda[/color] ( pair ) ([color=BLUE]member[/color] ([color=BLUE]car[/color] pair) '(0 100 73))) el) ([color=BLUE]list[/color] ([color=BLUE]cons[/color] 70 0) ([color=BLUE]cons[/color] 74 ([color=BLUE]cdr[/color] ([color=BLUE]assoc[/color] 73 el))) ([color=BLUE]cons[/color] 2 st) ([color=BLUE]cons[/color] 3 st) ) ) ) ([color=BLUE]entdel[/color] ([color=BLUE]cdr[/color] ([color=BLUE]assoc[/color] -1 el))) ) ) ) ([color=BLUE]princ[/color]) ) Quote
cadplayer Posted May 25, 2011 Posted May 25, 2011 yes this is very good. Is it possible to do attributs in a block. That means to convert text in attribut and paste in a block. Quote
Lee Mac Posted May 25, 2011 Posted May 25, 2011 I assume you're asking for the reverse of what I have just provided? Yes, it would be possible, following the same method as I have in my previous code. Quote
cadplayer Posted May 26, 2011 Posted May 26, 2011 I don´t understand exactly your question. Maby helps my exemple Drawing2.zip 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.