... Not sure I fully understand what you're requesting; perhaps this is what you're after?
http://apps.exchange.autodesk.com/AC...-Geometry%3aen
Registered forum members do not see this ad.
I have a co-worker looking for a way to make certain strings of text into linework. Is this even possible? I thought there might be a LISP routine out there that does something like this.
Example: Carthage County Line = ---- -- ---- -- ---- -- ---- (or something)
T. Nelson
Sr. Survey Technician
http://www.saminc.biz
"The only thing left to do is EVERYTHING!" - Jesse James
... Not sure I fully understand what you're requesting; perhaps this is what you're after?
http://apps.exchange.autodesk.com/AC...-Geometry%3aen
"Potential has a shelf life." - Margaret Atwood
Thanks RenderMan but I'm not looking for the lines that make up the text to become linework.
I'm wanting something to read "County Line" and make a line in the drawing with a phantom linetype. I don't even know if something like this is even possible?
T. Nelson
Sr. Survey Technician
http://www.saminc.biz
"The only thing left to do is EVERYTHING!" - Jesse James
You want "County Line" to be the command, or something found in the drawing... I am still not understanding.
If I am understanding you correctly, you're wanting a routine to detect a *Text entity that includes (or consists of) "County Line" in the Objects TextString, and then you want the code to create a *Line entity within the drawing's ModelSpace? Where?
Perhaps a before and after pic would help? More information is needed, methinks.
"Potential has a shelf life." - Margaret Atwood
T. Nelson
Sr. Survey Technician
http://www.saminc.biz
"The only thing left to do is EVERYTHING!" - Jesse James
Is this something like in a drawing legend? Could the start point of the line be a set vertical and horizontal offset from the insertion point of the text and the line a set length? Or does the line need start and end points?
Engage brain before mouth
"The German who types with a Yorkshire accent" - Dave Broada 2o1o
Maybe something like this?
Or have I misunderstood?Code:;; Text Linetype - Lee Mac ;; Creates and loads a custom linetype containing the specified text. ;; The linetype will use the Standard TextStyle in the linetype definition. ;; The space between dashes in the linetype is calculated based on the number of ;; characters in the supplied string, with an additional spacing of 0.05 drawing units. ;; Using a monospace font for the linetype will produce the best results. (defun c:txtlt ( / *error* des str tmp val var ) (defun *error* ( msg ) (mapcar 'setvar var val) (if (= 'file (type des)) (close des) ) (if (and tmp (findfile tmp)) (vl-file-delete tmp) ) (if (not (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")) (princ (strcat "\nError: " msg)) ) (princ) ) (cond ( (= "" (setq str (getstring t "\nSpecify Text for Linetype: ")))) ( (null (and (setq tmp (vl-filename-mktemp nil nil ".lin")) (setq des (open tmp "w")) (write-line (strcat "*" str "," str " ----" str "----" str "----") des) (write-line (strcat "A,.5,-.05,[\"" str "\",STANDARD,S=.1,R=0.0,X=0.0,Y=-.05]," (rtos (- (/ (strlen str) -10.0) 0.05) 2 1)) des) (not (setq des (close des))) (findfile tmp) ) ) (princ "\nUnable to create custom linetype definition.") ) ( (progn (setq var '(cmdecho expert) val (mapcar 'getvar var) ) (mapcar 'setvar var '(0 5)) (command "_.-linetype" "_L" "*" tmp "") (mapcar 'setvar var val) (vl-file-delete tmp) (tblsearch "LTYPE" str) ) (princ (strcat "\n" str " linetype created successfully.")) ) ( (princ (strcat "\nUnable to load linetype " str))) ) (princ) ) (princ)
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper
Capture.jpg
Does this help?
Select "COUNTY LINE" and from that, create a line/polyline at a certain length with a PHANTOM linetype. (Just as an example)
T. Nelson
Sr. Survey Technician
http://www.saminc.biz
"The only thing left to do is EVERYTHING!" - Jesse James
T. Nelson
Sr. Survey Technician
http://www.saminc.biz
"The only thing left to do is EVERYTHING!" - Jesse James
Registered forum members do not see this ad.
T. Nelson
Sr. Survey Technician
http://www.saminc.biz
"The only thing left to do is EVERYTHING!" - Jesse James
Bookmarks