Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Qleader variables in lisp routine ??

14 REPLIES 14
Reply
Message 1 of 15
MISCMETALS
2142 Views, 14 Replies

Qleader variables in lisp routine ??

 
14 REPLIES 14
Message 2 of 15
MISCMETALS
in reply to: MISCMETALS

How do I find them ?
I want to retain old qleader-mtext setting then change to "none" text.
After lisp routine adds qlader to dwg then I rest qleader back to old mtext setting.
Message 3 of 15
pendean
in reply to: MISCMETALS

While you wait... QLEADER relies on your active DIMSTYLE settings and variables: you can start HELP and look up all variables the start with DIM or start DIMSTYLE command, seek out the setting you desire to change, then tap the HELP button to read about it.
Message 4 of 15
Lee_Mac
in reply to: MISCMETALS


@Anonymous wrote:
How do I find them ?
I want to retain old qleader-mtext setting then change to "none" text.
After lisp routine adds qlader to dwg then I rest qleader back to old mtext setting.

The settings are stored under the Named Object Dictionary, within either the acaddim or acaddim_crx dictionary, depending on the version of AutoCAD you are using.

 

And here is a reference for the various DXF group codes, courtesy of Frank Whaley of Autodesk:

 

;;;   3: user arrowhead block name (default="")
;;;  40: default text width (default=0.0)
;;;  60: annotation type (default=0)
;;;      0=MText
;;;      1=copy object
;;;      2=Tolerance
;;;      3=block
;;;      4=none
;;;  61: annotation reuse (default=0)
;;;      0=none
;;;      1=reuse next
;;;  62: left attachment point (default=1)
;;;  63: right attachment point (default=3)
;;;      0=Top of top line
;;;      1=Middle of top line
;;;      2=Middle of multiline text
;;;      3=Middle of bottom line
;;;      4=Bottom of bottom line
;;;  64: underline bottom line (default=0)
;;;  65: use splined leader line (default=0)
;;;  66: no limit on points (default=0)
;;;  67: maximum number of points (default=3)
;;;  68: prompt for MText width (word wrap) (default=1)
;;;  69: always left justify (default=0)
;;;  70: allowed angle, first segment (default=0)
;;;  71: allowed angle, second segment (default=0)
;;;      0=Any angle
;;;      1=Horizontal
;;;      2=90deg
;;;      3=45deg
;;;      4=30deg
;;;      5=15deg
;;;  72: frame text (default=0)
;;; 170: active tab (default=0)
;;;      0=Annotation
;;;      1=Leader Line & Arrow
;;;      2=Attachment
;;; 340: object ID for annotation reuse

 

Message 5 of 15

Thanks Lee_Mac... Now i've found the issue...

 

the problem is the name of the dictionary that has changed...

 

if one has customized the leaders, change the dictionary name and that's all...

 

 

 

Thanks again

Message 6 of 15

I did not understand the solution given I'm not an expert on how to use lisp but I know just enough. I'm trying to setup a lisp to modify this Qleader variables per drawing so the drawing can read 63 . 1 and not the default 63 . 3. Can someone please setup an example lisp to modify this instance. ;;; 63: right attachment point (default=3) ;;; 0=Top of top line ;;; 1=Middle of top line ;;; 2=Middle of multiline text ;;; 3=Middle of bottom line ;;; 4=Bottom of bottom line thank you.
Message 7 of 15
hmsilva
in reply to: armando1903

Hi Armando,

 

do a search at 'Search This Board' for acet-ql-get, acet-ql-set, qlset.lsp or Frank Whaley,...
and you'll find an exemple by Frank Whaley, Autodesk

 

Please, pay attention to what Lee Mac have stated in is post:
'The settings are stored under the Named Object Dictionary, within either the acaddim or acaddim_crx dictionary, depending on the version of AutoCAD you are using.'

 

Hope that helps
Henrique

EESignature

Message 8 of 15
armando1903
in reply to: hmsilva

hmsilva this is the file I loaded and I typed acet-ql-get into the command line and thing happens. I copy the text exactly as they have it and tried modifying the file to work for me to change (63 . 3) to (63 . 1) and I can’t finger it out. Can you please review it let me know were those the modifications need to happen? I need to make this work, and I don’t know too. It’s so frustrating, I know it has to be something really easy but I can’t see it.

 

I also replace (acet-ql-get ) for (acet-ql-set '((63 . 1))) did not work.

I also replace AcadDim for acaddim_crx did not work.

 

Im also using Autocad 14 and 15 I dont know if that matters or not. 

Message 9 of 15
hmsilva
in reply to: armando1903

Armando,

 

for AC2014/15, try the modified code.

Load the code, enter (acet-ql-set '((63 . 1))) and the default right attachment point will be modified to 'Middle of top line', means the new qleader will be created with those settings.

 

Hope that helps

Henrique

EESignature

Message 10 of 15
armando1903
in reply to: hmsilva

I loaded the file "qlset_V1.lsp" you gave me with modifying it. When you said “enter (acet-ql-set '((63 . 1)))" what do mean? Do I create a new command with (acet-ql-set '((63 . 1))?
Message 11 of 15
hmsilva
in reply to: armando1903


@armando1903 wrote:
I loaded the file "qlset_V1.lsp" you gave me with modifying it. When you said “enter (acet-ql-set '((63 . 1)))" what do mean? Do I create a new command with (acet-ql-set '((63 . 1))?

Enter in command line (acet-ql-set '((63 . 1))) was just for testing purpose...

 

If you need a command to set the default right attachment point to 'Middle of top line', just add this code lines after the end of the code at qlset_V1.lsp

 

(defun c:demo ();; change demo to suits
  (acet-ql-set '((63 . 1)))
  (princ)
)

 

HTH

Henrique

EESignature

Message 12 of 15
armando1903
in reply to: hmsilva

OMG!!! THANK YOU SO MUCH THAT WORKED!!!

 

I apologize in the other message I meant to say “I loaded the file "qlset_V1.lsp" you gave me WITHOUT modifying it

 

So I understand loading the qlset_V1.lsp file you gave me without modifying it was to change the (acet-ql-set '((63 . 1))) setting for every drawing I open?

 

That did not happen when I loaded it.

Message 13 of 15
hmsilva
in reply to: armando1903


@armando1903 wrote:

OMG!!! THANK YOU SO MUCH THAT WORKED!!!

 


You're welcome, Armando!

 


@armando1903 wrote:

 

 So I understand loading the qlset_V1.lsp file you gave me without modifying it was to change the (acet-ql-set '((63 . 1))) setting for every drawing I open?

 

That did not happen when I loaded it.


Armando,

I just did change the Dictionary Name, in order to work with AC2014/2015.

 

Frank Whaley's qlset.lsp have two functions, the 'acet-ql-get' that  'Returns an association list containing the current QLEADER settings from the Named Object Dictionary', and 'acet-ql-set' that ' Sets the specified values for QLEADER settings from the given association list.'

Just loading the code, nothing happens, only defined functions are loaded into the current dwg.

To change some setting in QLEADER, we can use the 'acet-ql-set' function.

To use as a command, (as my previous post) we need to define a function (or a button) to call the 'acet-ql-set' function that requires as argument a list of dotted pairs. 

If your goal is to load the file and set the default right attachment point to 'Middle of top line' in all the files that you open without user intervention, just add  

(acet-ql-set '((63 . 1)))

after the end of the code at qlset_V1.lsp

 

Henrique

EESignature

Message 14 of 15
armando1903
in reply to: hmsilva

Thank you for all your help and patients with me. Both of the formats your suggested work well. Thank you once Again. I hope I can ask for more help from you in the future.
Message 15 of 15
hmsilva
in reply to: armando1903

You're welcome, Armando
Any doubt, just ask...

Henrique

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost