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

mleader - arrowhead or content first?

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
1234 Views, 3 Replies

mleader - arrowhead or content first?

Hi, is there a setvar to control whether an mleader object starts with either the arrowhead, or the landing first?

 

I know you can select it via the command prompt, but I'm starting the mleader from a LISP routine and want to specify that it's arrowhead first everytime. I've had guys that manage to change this setting by mistake, then not remember what they'd done to change it back. So I wanted to set the setting via LISP, so it wouldn't keep happening.

 

Thanks

3 REPLIES 3
Message 2 of 4
hmsilva
in reply to: Anonymous


@Anonymous borderliner wrote:

Hi, is there a setvar to control whether an mleader object starts with either the arrowhead, or the landing first?

 

I know you can select it via the command prompt, but I'm starting the mleader from a LISP routine and want to specify that it's arrowhead first everytime. ...


 Hi borderliner,

 

the only way that I remember to force mleader to start with the arrowhead is using the 'leader arrowHead first' option, if the mleader is already starting with the arrowhead first, the command will throw an 'Invalid Input.' but the code will continue until the end without canceling.

i.e.

(if (and (setq p1 (getpoint "\nSpecify leader arrowhead location: "))
         (setq p2 (getpoint p1 "\nSpecify first corner of text: "))
         (setq str (getstring T "\nEnter leader text: "))
    )
  (command "mleader" "_H" p1 p2 str)
)

 

Hope that helps

Henrique

EESignature

Message 3 of 4

I've just run into the same issue.

This worked for me. Just run the available command options in this order and the "Invalid Input" is avoided.

MLEADER , leader landing first, leader arrowhead first, point1, point2 string

 

While entering it through the command line, you will see that "L" is always an option, and that makes "H" a valid input.

 

(command "_.mleader" "_l" "_h" p1 p2 str)

 

-steve

Message 4 of 4

I would be inclined use that on its own [not in the followup to asking for the inputs], and to end  it after the arrowHead-first option, so you don't need to ask for points and text content ahead of time, and can use more than two points if you're set up for that, and can use a Block instead of text, or nothing, etc.:

 

(command "_.mleader" "_l" "_h")

 

It would leave you at the arrowhead-point prompt, to carry on from there with all options still available, just as in the "native" command.

 

Consider even UNDEFINING the native MLEADER command, and (defun)ing a new one that simply does the above.  You could include in acaddoc.lsp:

 

(command "_.undefine" "MLEADER")

(defun C:MLEADER ()

  (command "_.mleader" "_l" "_h")

)

 

Then, whenever you call up the command, by any means [type it in, type its alias in, autocomplete offering, pick from a menu item somewhere, etc.], regardless of what settings may have been changed, you'll always get the version with that option set back.

Kent Cooper, AIA

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

Post to forums  

Autodesk Design & Make Report

”Boost