Author Topic: Align Text Routine  (Read 15190 times)

0 Members and 1 Guest are viewing this topic.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10395
Re: Align Text Routine
« Reply #15 on: November 25, 2008, 10:08:21 AM »
That would do it.  :roll:

Try this version attached. It should correct the CENTER justification error Tim pointed out.

<edit: removed old code>

« Last Edit: November 26, 2008, 05:29:10 PM by CAB »
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Spike Wilbury

  • Guest
Re: Align Text Routine
« Reply #16 on: November 25, 2008, 10:31:51 AM »
now that I don't write lisp, it feels good to grab routines like this one :)

the only thing I do not like and never use it on my lisps was the use of cancel to stop a command, among the other stuff, it looks good.... (just a last one if I may... why does not leave the texts on their location(s) rows, instead of grouping them - OK was a quick test, uff to much wording, sorry)

Notsober

  • Guest
Re: Align Text Routine
« Reply #17 on: November 25, 2008, 10:35:52 AM »
it messes up my horizontal spacing.

Code: [Select]
Command: at
Select master text to align Verticaly or <"H"> to align Horrizontally:

I want to align Vertically only.


CAB

  • Global Moderator
  • Seagull
  • Posts: 10395
Re: Align Text Routine
« Reply #18 on: November 25, 2008, 10:48:54 AM »
Can you post a sample DWG so I can see your request / problem?

I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10395
Re: Align Text Routine
« Reply #19 on: November 25, 2008, 10:49:51 AM »
Thanks Luis.
I was setting up for the user exit but never got to that. Added it to this revised 1.2 version.
See post above.
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Spike Wilbury

  • Guest
Re: Align Text Routine
« Reply #20 on: November 25, 2008, 11:00:00 AM »
Thanks Luis.
I was setting up for the user exit but never got to that. Added it to this revised 1.2 version.
See post above.

Downloaded....

Alan,

It is the idea of doing the alignment in my case vertical - to place the selected text(s) below the master text (per the prompt) ?

It does not preserve the same row location?

Thanks.

Notsober

  • Guest
Re: Align Text Routine
« Reply #21 on: November 25, 2008, 11:09:22 AM »
Thanks Luis.
I was setting up for the user exit but never got to that. Added it to this revised 1.2 version.
See post above.

Downloaded....

Alan,

It is the idea of doing the alignment in my case vertical - to place the selected text(s) below the master text (per the prompt) ?

It does not preserve the same row location?

Thanks.

this is what I'm talking about...

I have a certain spacing between the individual notes... when I select master text, then all text to be aligned with master, it moves not only in the horizontal, but also vertically, thus trashing the spacing between the notes.
« Last Edit: November 25, 2008, 11:15:48 AM by Notsober »

CAB

  • Global Moderator
  • Seagull
  • Posts: 10395
Re: Align Text Routine
« Reply #22 on: November 25, 2008, 11:16:35 AM »
The Master text spacing is used to set the vertical spacing of the remaining text objects.
Code: [Select]
gap  (* (cdr(assoc 40 elist)) 0.6666) ; text height of master textIf there are mtext objects selected it will not alter the spacing within the mtext.

The alignment is also based on the Master Text Object. If it is Right justified then the remaining text
will be moved to the right side but the actual alignment style of the remaining text will not be changed.

Note that the Horizontal option in the first prompt is not functional at this time.

Having said all that I get the feeling I'm missing your point as to what is not functioning properly.  :-(
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Spike Wilbury

  • Guest
Re: Align Text Routine
« Reply #23 on: November 25, 2008, 11:19:27 AM »
Thanks Luis.
I was setting up for the user exit but never got to that. Added it to this revised 1.2 version.
See post above.

Downloaded....

Alan,

It is the idea of doing the alignment in my case vertical - to place the selected text(s) below the master text (per the prompt) ?

It does not preserve the same row location?

Thanks.

this is what I'm talking about...

I have a certain spacing between the individual notes... when I select master text, then all text to be aligned with master, it moves not only in the horizontal, but also vertically, thus trashing the spacing between the notes.

I see.... next time I need to read the description on Alan's routine:

Quote
Align a group of text or mtext objects along there X or Y axis
User picks Master text & then text to align under it <<<<----------------

CAB

  • Global Moderator
  • Seagull
  • Posts: 10395
Re: Align Text Routine
« Reply #24 on: November 25, 2008, 11:33:16 AM »
Notsober,
You did not include a BEFORE example so i can't tell.
But you want to set your own vertical spacing or to ignore vertical spacing?

As you can see from my examples I had envisioned the routine cleaning up a very messy DWG.
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Notsober

  • Guest
Re: Align Text Routine
« Reply #25 on: November 25, 2008, 11:33:33 AM »

I see.... next time I need to read the description on Alan's routine:

Quote
Align a group of text or mtext objects along there X or Y axis
User picks Master text & then text to align under it <<<<----------------

haha... align right under it

Notsober

  • Guest
Re: Align Text Routine
« Reply #26 on: November 25, 2008, 11:34:35 AM »
Notsober,
You did not include a BEFORE example so i can't tell.

i certainly did here

Quote
But you want to set your own vertical spacing or to ignore vertical spacing?

both would be nice ;)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10395
Re: Align Text Routine
« Reply #27 on: November 25, 2008, 11:40:34 AM »
I had trouble with the pictures, could not find the item number.
This is my test.
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Notsober

  • Guest
Re: Align Text Routine
« Reply #28 on: November 25, 2008, 11:47:18 AM »
I had trouble with the pictures, could not find the item number.
This is my test.


see how it changed my vertical spacing?

that would be an undesirable outcome for me... I work hard to get all that text spaced just right!  :-P

CAB

  • Global Moderator
  • Seagull
  • Posts: 10395
Re: Align Text Routine
« Reply #29 on: November 25, 2008, 11:53:48 AM »
In the test DWG you posted the text looked fine.
Please post a DWG with the wrong result.
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.