mr. tony hotchkiss got at TEXT2ATT.LSP have a look at cadalyst.com

Registered forum members do not see this ad.
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
mr. tony hotchkiss got at TEXT2ATT.LSP have a look at cadalyst.com
Last edited by wizman; 12th Nov 2008 at 07:49 am. Reason: deleted wrong link

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
stephen could you please post a sample drawing with your block with attributes. so that guys here can take a look at your goal.
What are you trying to achieve cadplayer?
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper
Use BEDIT on the block, then use this to convert Text to Attribute Definitions:
Code:;;-------------------=={ Text 2 Attribute }==-----------------;; ;; ;; ;; Converts single-line text to an attribute definition. ;; ;;------------------------------------------------------------;; ;; Author: Lee Mac, Copyright © 2011 - www.lee-mac.com ;; ;;------------------------------------------------------------;; (defun c:txt2att ( / el i ss st ) (vl-load-com) (if (setq ss (ssget "_:L" '((0 . "TEXT")))) (repeat (setq i (sslength ss)) (setq el (entget (ssname ss (setq i (1- i)))) st (vl-string-translate " " "_" (cdr (assoc 1 el))) ) (if (entmakex (append '((0 . "ATTDEF")) (vl-remove-if '(lambda ( pair ) (member (car pair) '(0 100 73))) el) (list (cons 70 0) (cons 74 (cdr (assoc 73 el))) (cons 2 st) (cons 3 st) ) ) ) (entdel (cdr (assoc -1 el))) ) ) ) (princ) )
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper
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.
Registered forum members do not see this ad.
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.
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper
Bookmarks