Saturday, November 21, 2009
Home   |   Search   |   About AUGI   |   My AUGI   |   Join Now

Go Back   AUGI Forums > AUGI Technical (English) > Programming > AutoLISP
 Welcome, Guest. 

Login

Join Now FAQ Members List Calendar Search Today's Posts Mark Forums Read

AutoLISP AutoLISP or Visual LISP, learn both here!

Reply
 
Thread Tools Display Modes
Old 2004-06-28, 03:37 PM   #1
jhohman
100 Club
 
jhohman's Avatar
 
Join Date: 2003-08
Location: Spring Hill, Florida
Posts: 195
jhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightly
Lightbulb Routine to add text below existing text

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?
jhohman is offline   Reply With Quote
Old 2004-06-28, 06:55 PM   #2
Mike.Perry
Administrator
 
Mike.Perry's Avatar
 
Join Date: 2001-03
Location: Fenton, MO via the UK
Posts: 13,500
Mike.Perry has disabled reputation
Default RE: LISP Request - Anyone

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
__________________
..........MeWhee
Mike.Perry is offline   Reply With Quote
Old 2004-06-29, 02:19 PM   #3
whdjr
I could stop if I wanted to
 
Join Date: 2003-05
Posts: 335
whdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of light
Default RE: LISP Request - Anyone

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)
)
Hope this helps,
__________________
Good Blockin'

Will DeLoach
AutoCad / ADT 2006
whdjr is offline   Reply With Quote
Old 2004-06-29, 05:02 PM   #4
jhohman
100 Club
 
jhohman's Avatar
 
Join Date: 2003-08
Location: Spring Hill, Florida
Posts: 195
jhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightly
Question RE: LISP Request - Anyone

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?
jhohman is offline   Reply With Quote
Old 2004-06-29, 05:17 PM   #5
stig.madsen
100 Club
 
Join Date: 2000-12
Posts: 126
stig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightly
Default

Try adding a function like this and see if it works:
(defun *dxf* (val ent)(cdr (assoc val ent)))
stig.madsen is offline   Reply With Quote
Old 2004-06-29, 05:25 PM   #6
jhohman
100 Club
 
jhohman's Avatar
 
Join Date: 2003-08
Location: Spring Hill, Florida
Posts: 195
jhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightly
Question RE: LISP Request - Anyone

Quote:
Originally Posted by stig.madsen
Try adding a function like this and see if it works:
(defun *dxf* (val ent)(cdr (assoc val ent)))

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?
jhohman is offline   Reply With Quote
Old 2004-06-29, 06:26 PM   #7
stig.madsen
100 Club
 
Join Date: 2000-12
Posts: 126
stig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightlystig.madsen is glowing brightly
Default

Anywhere .. just as long as it is loaded before you run c:CONTXT
stig.madsen is offline   Reply With Quote
Old 2004-06-29, 07:11 PM   #8
whdjr
I could stop if I wanted to
 
Join Date: 2003-05
Posts: 335
whdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of light
Default RE: LISP Request - Anyone

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
whdjr is offline   Reply With Quote
Old 2004-06-29, 09:05 PM   #9
jhohman
100 Club
 
jhohman's Avatar
 
Join Date: 2003-08
Location: Spring Hill, Florida
Posts: 195
jhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightlyjhohman is glowing brightly
Talking RE: LISP Request - Anyone

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?
jhohman is offline   Reply With Quote
Reply


Go Back   AUGI Forums > AUGI Technical (English) > Programming > AutoLISP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

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


All times are GMT +1. The time now is 02:46 PM.