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

move selected objects by value of their X or Y properties

21 REPLIES 21
SOLVED
Reply
Message 1 of 22
aqdam1978
3118 Views, 21 Replies

move selected objects by value of their X or Y properties

Hi, I need a program to move some selected text to a line something like as extend command but for text objects!

suppose that there is a horizental line (y=constant) or vertical line (x=constant) and some selected text(or other objects), I want a lisp program that move these selected text (or objects) by their "insertion point" to this line.

in other word, if the selected base line is horizental (y=constant) then property of "Y" of all selected text should change to line's "Y"; and if selected base line is vertical (x=constant) then value of "X" of all selected text should match to line's "X" value.

 

for example, for base vertical line (x=constant) and 3 selected text(or can be any object) result is:

 

text1.          |                        text1.|

  text2.        |         ===>       text2.|

    text3.      |                        text3.|

 

|  .text1                                 |.text1

|    .text2                ===>       |.text2

|      .text3                             |.text3

 

 

Does anybody have solution?

Thanks,

 

 

 

21 REPLIES 21
Message 21 of 22
Moshe-A
in reply to: aqdam1978

the problem is the text insertion point they have Z value

but as you can see the program now ignore it

 

remember if you will need in future to align text that are at some rotation? you can do it 

 

Message 22 of 22
Kent1Cooper
in reply to: aqdam1978


@aqdam1978 wrote:

.... 

please find the attached, a sample dwg in 2010 version.

.... 


[Interestingly, in that particular sample drawing, you can get them aligned the way you want by just Mirroring them [with MIRRTEXT = 0] about a vertical axis.  They retain their middle-right justification, and those right-end insertion points are all aligned because the left-end-of-base-line points were aligned in the starting conditions.  But it's applicable only to limited circumstances -- I assume from your earlier in-message example that the alignment in the sample drawing would not always be the way things are.]

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