Author Topic: Dynamic Text Alignment  (Read 27255 times)

0 Members and 1 Guest are viewing this topic.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Dynamic Text Alignment
« Reply #30 on: October 15, 2009, 09:19:54 AM »
Andrea,

I find it better to check for ET, using something like this:

Code: [Select]
(if (vl-catch-all-error-p
      (vl-catch-all-apply (function (lambda ( ) (acet-sys-shift-down)))))
  (...


You could accomplish the same thing with
Code: [Select]
(and acet-sys-shift-down)
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Dynamic Text Alignment
« Reply #31 on: October 15, 2009, 10:02:56 AM »
Andrea,

I find it better to check for ET, using something like this:

Code: [Select]
(if (vl-catch-all-error-p
      (vl-catch-all-apply (function (lambda ( ) (acet-sys-shift-down)))))
  (...


You could accomplish the same thing with
Code: [Select]
(and acet-sys-shift-down)

I thought that (acet-sys-shift-down) threw an error if the user did not have ET, is this not the case?   :?

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Dynamic Text Alignment
« Reply #32 on: October 15, 2009, 10:19:06 AM »
Andrea,

I find it better to check for ET, using something like this:

Code: [Select]
(if (vl-catch-all-error-p
      (vl-catch-all-apply (function (lambda ( ) (acet-sys-shift-down)))))
  (...


You could accomplish the same thing with
Code: [Select]
(and acet-sys-shift-down)

I thought that (acet-sys-shift-down) threw an error if the user did not have ET, is this not the case?   :?

(and Anything) or (not Anything) just checks to see if its something defined.

Code: [Select]
(and (not acet-sys-shift-down)
     (findfile "AcetUtil.arx")
     (arxload (findfile "AcetUtil.arx"))
     )
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Dynamic Text Alignment
« Reply #33 on: October 15, 2009, 10:24:29 AM »
You left out (null Anything)  8-)
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.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Dynamic Text Alignment
« Reply #34 on: October 15, 2009, 10:28:59 AM »
You left out (null Anything)  8-)
I didn't think about null, the only time I've ever even used null is vl-remove-if[-not] 'null.
Thanks Alan. :)
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Dynamic Text Alignment
« Reply #35 on: October 15, 2009, 12:34:51 PM »
another approach..

Code: [Select]
(if (eval c:expresstools) ..
or
Code: [Select]
(if c:expresstools ..
?
Keep smile...

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Dynamic Text Alignment
« Reply #36 on: October 16, 2009, 07:24:54 AM »
Ahh, I see - thanks Alan(s) - I had just never seen it used in that way  ;-)




Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Dynamic Text Alignment
« Reply #37 on: October 16, 2009, 07:32:24 AM »
I have updated the code in the first post to include a new mode: STRETCH  ;-)

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Dynamic Text Alignment
« Reply #38 on: October 16, 2009, 08:34:48 AM »
wow !  better and better... ;-)

one point..
the S option not working on Stretch mode... :pissed:
Keep smile...

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Dynamic Text Alignment
« Reply #39 on: October 16, 2009, 08:46:47 AM »
You left out (null Anything)  8-)
I didn't think about null, the only time I've ever even used null is vl-remove-if[-not] 'null.
Thanks Alan. :)
I use nil in that case:
Code: [Select]
(vl-remove nil '(1 2 3 nil 4))
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.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Dynamic Text Alignment
« Reply #40 on: October 16, 2009, 09:03:22 AM »
You left out (null Anything)  8-)
I didn't think about null, the only time I've ever even used null is vl-remove-if[-not] 'null.
Thanks Alan. :)
I use nil in that case:
Code: [Select]
(vl-remove nil '(1 2 3 nil 4))
Well.....I'm just dumb.
Thanks Alan. :-)
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Dynamic Text Alignment
« Reply #41 on: October 16, 2009, 09:27:12 AM »
Just add another tool to your tool box. 8-)
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.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Dynamic Text Alignment
« Reply #42 on: October 16, 2009, 09:31:08 AM »
Just add another tool to your tool box. 8-)
Far too many of my tools have Thanks to CAB on them.
Thanks Alan. :)
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

cjw

  • Guest
Re: Dynamic Text Alignment
« Reply #43 on: October 16, 2009, 10:29:02 PM »
Nice work Lee~
It will be more nice after make the "STRETCH" Dynamic too~~ 8-)

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Dynamic Text Alignment
« Reply #44 on: October 18, 2009, 07:51:24 AM »
wow !  better and better... ;-)

one point..
the S option not working on Stretch mode... :pissed:

Thanks Andrea - I have plenty of other ideas to come!  :wink:

As for the spacing option (s) - in Stretch mode a message appears on the command line, saying that Text cannot be spaced in that mode... because obviously the spacing would be altered as soon as the user hit enter...  ;-)

Lee