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-07-08, 10:26 PM   #1
LT.Seabee
Member
 
LT.Seabee's Avatar
 
Join Date: 2004-07
Posts: 17
LT.Seabee is going the right wayLT.Seabee is going the right way
Question Pause in Qleader?

I'm trying to create a routine that will allow me from any layer to run this routine and do a leader & text on the correct layer and THEN go back to the original layer. So far, I'm able to achieve everything other than going back to the original layer. The only success I have had is putting "pause" in the qleader command, but then it gives me an extra "/" or "/P".

Any suggestions?
LT.Seabee is offline   Reply With Quote
Old 2004-07-08, 11:00 PM   #2
sinc
AUGI Addict
 
sinc's Avatar
 
Join Date: 2004-02
Location: Colorado
Posts: 1,531
sinc is shooting for the starssinc is shooting for the starssinc is shooting for the starssinc is shooting for the starssinc is shooting for the starssinc is shooting for the starssinc is shooting for the starssinc is shooting for the starssinc is shooting for the starssinc is shooting for the starssinc is shooting for the stars
Default

Maybe you should post your code so we can see it. I don't think there's enough information in your post to tell what the problem might be.
sinc is online now   Reply With Quote
Old 2004-07-09, 03:16 AM   #3
hot4cad
Member
 
Join Date: 2001-02
Posts: 4
hot4cad is starting their journey
Default RE: Pause in Qleader?

This is what you need ...
<capture current layer-set desired layer>
(setvar "texteval" 1) ; Force ACAD to accept input
(command "_.qleader") ; Start qleader command
<reset current layer>
hot4cad is offline   Reply With Quote
Old 2004-07-09, 01:09 PM   #4
hot4cad
Member
 
Join Date: 2001-02
Posts: 4
hot4cad is starting their journey
Default RE: Pause in Qleader?

oops .. fell asleep at the keyboard last night I think ... lets retry...

<get current layer - set desired layer>
(setvar "texteval" 1) ; Force ACAD to accept input
(setvar "cmdecho" 1) ; Turn cmdecho back on
(command "_.qleader") ; Start qleader command
(while (> (getvar "cmdactive") 0) (command pause))
<do your resets -including "texteval" 0>

Yep thats more like it.
hot4cad is offline   Reply With Quote
Old 2004-07-12, 03:16 PM   #5
LT.Seabee
Member
 
LT.Seabee's Avatar
 
Join Date: 2004-07
Posts: 17
LT.Seabee is going the right wayLT.Seabee is going the right way
Smile RE: Pause in Qleader?

Excellent! That did it! Now I can tweak it with some other good MTEXT info and I'll be good. Here is my code in appreciation for the help!

Code:
(DEFUN C:AL (/ CLH PT1 PT2 MTW DSC)
  	(princ "- Architectural Leader -")
  	(terpri)
	(setvar "cmdecho" 0)			;sets command echo
	(SETQ DSC (GETVAR "DIMSCALE"))		;sets DSC = Dimscale
	(setq ds (getvar "dimstyle"))		;sets DS = Dimstyle
	(setq os (getvar "osmode"))		;sets OS = current snap setting
	(SETQ CLH (GETVAR "CLAYER"))		;sets CLH = Current Layer
	(if (= (tblsearch "layer" "A-ANNO-NOTE") nil)
		(command "layer" "m" "A-ANNO-NOTE" "c" 1 "" "")
		(setvar "clayer" "A-ANNO-NOTE")
	)

	(if (= (tblsearch "style" "HPA") nil)
		(command "style" "HPA" "ARIAL NARROW" "0" "1" "" "" "" "")
		(setvar "textstyle" "HPA")
	)
	(if (= (tblsearch "dimstyle" "HPA") nil)		
		(command "dimstyle" "save" "HPA" "")		
		(command "dimstyle" "restore" "HPA")		
	)
	(PRINC)
	(setq PT1 (getpoint "\nSelect First point: "))
	(setvar "osmode" 512)
	(setq PT2 (getpoint pt1 "\nSelect Second point: "))
	(setvar "osmode" os)		;restore osnap setting
	(SETQ MTW (* DSC 1.625))		;sets MTW = Mtext width
	(PRINT)
	(setvar "texteval" 1)
	(setvar "cmdecho" 1)
	(COMMAND "_QLEADER" PT1 PT2 "" MTW)	;creates leader & then mtext
	(while (> (getvar "cmdactive") 0) (command pause))
	(setvar "cmdecho" 0)
	(prompt "\nReset to previous layer: ")
	(SETVAR "CLAYER" CLH)			;resets current layer
	(setvar "texteval" 0)
)
(PRINC)

Last edited by Glenndp : 2004-07-12 at 03:20 PM. Reason: Placed routine in code tag
LT.Seabee 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
Is there a way to Automatically set the QLEADER defaults? anovelli AutoCAD Customization 9 2007-06-01 07:24 PM
QLeader with MText does not honour MText Line Spacing setting anovelli AutoCAD General 8 2007-03-12 04:18 AM
QLEADER Stuff psuchewinner AutoLISP 8 2004-07-09 08:47 AM
QLEADER SETTINGS anovelli AutoCAD "Original" Wish List (Archived) 2 2004-06-30 09:52 AM


All times are GMT +1. The time now is 05:14 PM.