Author Topic: MLEADER ALIGN  (Read 1740 times)

0 Members and 1 Guest are viewing this topic.

jmyrwen

  • Guest
MLEADER ALIGN
« on: October 26, 2016, 07:17:45 AM »
Hello, need some help. Im trying to create a lisp that will do the following

1. select the objects (mleaders)
2. pick points to align

here's the code that i did

Code - Auto/Visual Lisp: [Select]
  1. (defun c:mu (/ p1 p2)
  2. (setq p1 (getpoint "\nPick origin point:)"))
  3.   (command "osmode" "0")
  4.   (command "orthomode" "0")
  5.   (setq p2 (getpoint "\nPick target" p1))
  6.   (princ)
  7. (command "_mleaderalign" (ssget "_X") p1 p2 "_o" "U")
  8.  )

ChrisCarlson

  • Guest
Re: MLEADER ALIGN
« Reply #1 on: October 26, 2016, 07:51:46 AM »
I'm confused, the routine as you have it is trying to align ALL mleader entities in the database. The mleaderalign command within AutoCAD is quite powerful, what are you trying to do in addition to it?

Extended search (Entire Drawing Database) [automated] [documented]

Iterates over the entire drawing database selection all entities matching the criteria given by the supplied filter list (if present); includes entities on layers that are off, frozen & locked, and entities outside of the visible drawing area.

Quote
Example:
(ssget "_X" '((0 . "CIRCLE")))

Selects all circles in every drawing layout.

jmyrwen

  • Guest
Re: MLEADER ALIGN
« Reply #2 on: October 26, 2016, 08:28:26 AM »
i want to select only specific leaders to align and then let me pick 2 points where to align them without putting again "options" "use current spacing"

ChrisCarlson

  • Guest
Re: MLEADER ALIGN
« Reply #3 on: October 26, 2016, 09:52:05 AM »
Use Current Spacing option should be default and shouldn't change unless you manually change it.

jmyrwen

  • Guest
Re: MLEADER ALIGN
« Reply #4 on: October 26, 2016, 01:09:58 PM »
Command: MLEADERALIGN
Select multileaders: Specify opposite corner: 3 found
Select multileaders:
Current mode: Use current spacing
Select multileader to align to or [Options]:o
Enter an option [Distribute/make leader segments Parallel/specify Spacing/Use current spacing] <Use current spacing>: u
Select multileader to align to or [Options]:
Specify direction:

here's the usual commands im working, just want to shorten like after selecting mleaders the next step is to just pick where i want to align them, im not sure if possible

ChrisCarlson

  • Guest
Re: MLEADER ALIGN
« Reply #5 on: October 26, 2016, 02:27:04 PM »
Start the mleaderalign command
Select mleader entities
Select first point
Select second point

There is no need to manually select Option and then Use current spacing.

jmyrwen

  • Guest
Re: MLEADER ALIGN
« Reply #6 on: October 26, 2016, 10:38:33 PM »
yeah im just trying to translate it to lisp :) anyway thanks for your help