|
Welcome, Guest.
|
||||||
| AutoLISP AutoLISP or Visual LISP, learn both here! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
100 Club
Join Date: 2003-08
Location: Spring Hill, Florida
Posts: 195
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
I am looking for a LISP routine that will allow me to input text by selecting an existing line of text and allow me to add text below the selected line in the same way that I could if I had continued typing. So, if I had a notation and leader on say a detail, the LISP would ask me to select the text I want to continue from and after I select the text it would place the start point one line below the selected text. I hope this is understandable, I had found a routine before that did this but cannot find it now, anybody have any ideas. Thanks.
__________________
Jay Hohman CAD Technician Pulte Homes, Inc. If you lack the time to do something right the first time, when will you have time to fix it? |
|
|
|
|
|
#2 |
|
Administrator
Join Date: 2001-03
Location: Fenton, MO via the UK
Posts: 13,500
![]() |
Hi
Check out the following submission # EX001241 by Ed Jobe on the AUGI Exchange - Search AUGI Exchange Page If memory serves this Text utility has the functionality you're after, hopefully Ed can confirm this one-way or the other. Have a good one, Mike
__________________
|
|
|
|
|
|
#3 |
|
I could stop if I wanted to
Join Date: 2003-05
Posts: 335
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Jay,
This is one that we use for Dtext. I don't know where we got it or who wrote it. Code:
(defun c:CONTXT (/ uecho fht ent ins alignx alignp) (setq uecho (getvar "cmdecho")) (setvar "cmdecho" 0) (and (setq ent (entsel "\nLast line of text: ")) (setq ent (entget (car ent))) (= (*dxf* 0 ent) "TEXT") (or (/= (*dxf* '72 ent) 3) (prompt "\nDoesn't work on ALIGNED text.") ) (or (/= (*dxf* '72 ent) 5) (prompt "\nDoesn't work on FIT text.") ) (progn (setq ins (*dxf* 10 ent) fht (/= 0.0 (*dxf* 40 (tblsearch "STYLE" (*dxf* 7 ent)))) ) (if (/= (*dxf* 8 ent) (getvar "clayer")) (command ".layer" "s" (*dxf* 8 ent) "") ) (if (or (setq alignx (*dxf* (*dxf* 72 ent) '((1 . "c") (2 . "r") (4 . "m")))) (setq alignp (*dxf* (*dxf* 73 ent) '((1 . "b") (2 . "m") (3 . "t")))) ) (setq ins (*dxf* 11 ent)) ) (if (not alignx) (setq alignx "l") ) (if alignp (setq alignx (strcat alignp alignx)) ) (command ".text" "s" (*dxf* 7 ent)) (if (/= alignx "l") (command alignx) ) (command ins) (if (not fht) (command (*dxf* 40 ent)) ) (command (angtos (*dxf* 50 ent)) " ") (prompt "\nNew text: ") (command ".dtext" "") ) ) (setvar "cmdecho" uecho) (princ) )
__________________
Good Blockin' Will DeLoach AutoCad / ADT 2006 |
|
|
|
|
|
#4 |
|
100 Club
Join Date: 2003-08
Location: Spring Hill, Florida
Posts: 195
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Perhaps I am doing something wrong, but I get this after I try to use the LISP:
Command: contxt Last line of text: ; error: no function definition: *DXF* It asks me to select the last line of text then returns to the command prompt after I select the text.
__________________
Jay Hohman CAD Technician Pulte Homes, Inc. If you lack the time to do something right the first time, when will you have time to fix it? |
|
|
|
|
|
#5 |
|
100 Club
Join Date: 2000-12
Posts: 126
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Try adding a function like this and see if it works:
(defun *dxf* (val ent)(cdr (assoc val ent))) |
|
|
|
|
|
#6 | |
|
100 Club
Join Date: 2003-08
Location: Spring Hill, Florida
Posts: 195
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Quote:
Where would I insert this function?? At the end?
__________________
Jay Hohman CAD Technician Pulte Homes, Inc. If you lack the time to do something right the first time, when will you have time to fix it? |
|
|
|
|
|
|
#7 |
|
100 Club
Join Date: 2000-12
Posts: 126
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Anywhere .. just as long as it is loaded before you run c:CONTXT
|
|
|
|
|
|
#8 |
|
I could stop if I wanted to
Join Date: 2003-05
Posts: 335
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Stig's post will work, but here is the one I left out.
Sorry. Code:
(defun *dxf* (gcode elist) (cdr (assoc gcode elist)) )
__________________
Good Blockin' Will DeLoach AutoCad / ADT 2006 |
|
|
|
|
|
#9 |
|
100 Club
Join Date: 2003-08
Location: Spring Hill, Florida
Posts: 195
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Thanks alot guys, I really appreciate all the help.
__________________
Jay Hohman CAD Technician Pulte Homes, Inc. If you lack the time to do something right the first time, when will you have time to fix it? |
|
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Export linetype definitions | bbapties | AutoCAD Customization | 7 | 2006-08-15 08:29 PM |
| Replace existing Border while keeping Attribute Text | neilcheshire | AutoCAD LT - General | 2 | 2006-07-20 12:26 PM |
| Area routine that works like a hatch pick point | doggarn | Land Desktop - General | 2 | 2004-09-13 05:50 AM |
| Text Note Improvements | bclarch | Revit Architecture "Original" Wish List (Archived) | 33 | 2004-08-05 05:16 PM |
| Bold text for shape fonts with named plot styles? | sinc | AutoCAD General | 1 | 2004-06-29 09:45 AM |