Author Topic: Dynamic Text Alignment  (Read 16411 times)

0 Members and 1 Guest are viewing this topic.

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Dynamic Text Alignment
« Reply #15 on: October 13, 2009, 03:48:29 PM »
Hallo Lee

ein fester Winkel mit 90 oder 0 Grad wäre auch toll.

Danke

Das ist, was ich gerade hinzugefügt haben  :kewl:
Keep smile...

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Dynamic Text Alignment
« Reply #16 on: October 13, 2009, 04:14:05 PM »
parenthesis seen missing ??

and a check like that should be done when the file loads, not in the middle of the routine :)

maybe you can add something like...a rotation ?

Code: [Select]
[color=grey]
.......
  (setq bPt (vlax-get obj prop))
                       (if (setq iPt (inters pt data (polar bPt *tx 1) bPt nil))
                         (vlax-put Obj prop iPt))[/color]
[color=blue]
        (if (and (findfile "AcetUtil.arx") not acet-sys-shift-down)
          (arxload (findfile "AcetUtil.arx"))
        )
        (if (acet-sys-shift-down)
          (vla-put-rotation obj (+ (angle pt data) 1.5708))
        )
[/color]
[color=grey] ) t)
                  (  (= 2 code)                   
                     (cond  (  (= 13 data) nil)
                            (  (= 32 data) nil)[/color]
.....

Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Dynamic Text Alignment
« Reply #17 on: October 13, 2009, 04:30:08 PM »
parenthesis seen missing ??

and a check like that should be done when the file loads, not in the middle of the routine :)

maybe you can add something like...a rotation ?

Code: [Select]
[color=grey]
.......
  (setq bPt (vlax-get obj prop))
                       (if (setq iPt (inters pt data (polar bPt *tx 1) bPt nil))
                         (vlax-put Obj prop iPt))[/color]
[color=blue]
        (if (and (findfile "AcetUtil.arx") not acet-sys-shift-down)
          (arxload (findfile "AcetUtil.arx"))
        )
        (if (acet-sys-shift-down)
          (vla-put-rotation obj (+ (angle pt data) 1.5708))
        )
[/color]
[color=grey] ) t)
                  (  (= 2 code)                   
                     (cond  (  (= 13 data) nil)
                            (  (= 32 data) nil)[/color]
.....



no parenthesis is missing...
Keep smile...

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Dynamic Text Alignment
« Reply #18 on: October 13, 2009, 06:21:28 PM »

Really ??

(findfile "AcetUtil.arx")  ;-> returns the file Path
not                        ;-> returns the SUBR object
acet-sys-shift-down        ;-> returns the SUBR object

I think you meant:-
(if (and (findfile "AcetUtil.arx") (not acet-sys-shift-down))

 ;; ... (arxload


If not, your logic is screwed.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

Lee Mac

  • Seagull
  • Posts: 12356
  • London, England
Re: Dynamic Text Alignment
« Reply #19 on: October 14, 2009, 08:14:38 AM »
Nice idea about the rotation - definitely going to include that in a later release  :wink:

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Dynamic Text Alignment
« Reply #20 on: October 14, 2009, 08:16:22 AM »

Really ??

(findfile "AcetUtil.arx")  ;-> returns the file Path
not                        ;-> returns the SUBR object
acet-sys-shift-down        ;-> returns the SUBR object

I think you meant:-
(if (and (findfile "AcetUtil.arx") (not acet-sys-shift-down))

 ;; ... (arxload


If not, your logic is screwed.


well,..you'r right..

I didn't check that way..
thanks.

Ok Lee...it was just a suggestion....nice code.!
Keep smile...

Lee Mac

  • Seagull
  • Posts: 12356
  • London, England
Re: Dynamic Text Alignment
« Reply #21 on: October 14, 2009, 08:16:35 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)))))
  (...



Lee Mac

  • Seagull
  • Posts: 12356
  • London, England
Re: Dynamic Text Alignment
« Reply #22 on: October 14, 2009, 08:19:18 AM »
I have updated the code in the first post to Version 1.1, now the user can specify the Text Spacing  8-)

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Dynamic Text Alignment
« Reply #23 on: October 14, 2009, 08:33:53 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)))))
  (...


OK...but i'm curious to know how many people have expresstool available but not loaded.. :?



Keep smile...

GDF

  • Water Moccasin
  • Posts: 2036
Re: Dynamic Text Alignment
« Reply #24 on: October 14, 2009, 10:27:07 AM »
The biggest problem with expresstools is the two versions for 32 and 64 bit. The arx files have the same name...so if you have them all on a network it gets to be a problem.
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

Krushert

  • Seagull
  • Posts: 13593
  • FREE BEER Tomorrow!!
Re: Dynamic Text Alignment
« Reply #25 on: October 14, 2009, 10:53:52 AM »
I have updated the code in the first post to Version 1.1, now the user can specify the Text Spacing  8-)
Sweet!!!  8-)
I will play with it when I get to work and get a chance.  Home with a sick kid
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here for camaraderie

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Dynamic Text Alignment
« Reply #26 on: October 14, 2009, 12:03:13 PM »
The biggest problem with expresstools is the two versions for 32 and 64 bit. The arx files have the same name...so if you have them all on a network it gets to be a problem.

Sure if you mix all 64 and 32 bits files in same directory ..
maybe you need to revise the structure folder concept.
Otherwise...it is not seem to be a problem.
or maybe i'm not sure to understand the problem.. :|
Keep smile...

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Dynamic Text Alignment
« Reply #27 on: October 14, 2009, 03:47:58 PM »
another suggestion Lee...

is the spacing should be calculated from insertion point or space between text ?
I mean...if you select an MTEXT who have multiline with simple Dtext ..the spacing will take
the insertion of it and have as result a text over an MTEXT.

maybe by using textbox or boundingbox you can catch the textframe ?

Just a suggestion... :angel:
Keep smile...

Lee Mac

  • Seagull
  • Posts: 12356
  • London, England
Re: Dynamic Text Alignment
« Reply #28 on: October 15, 2009, 06:43:32 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)))))
  (...


OK...but i'm curious to know how many people have expresstool available but not loaded.. :?

I suppose if the above does not return an error, then put a conditional to load the relevant Arx file  :-)

Lee Mac

  • Seagull
  • Posts: 12356
  • London, England
Re: Dynamic Text Alignment
« Reply #29 on: October 15, 2009, 06:46:40 AM »
another suggestion Lee...

is the spacing should be calculated from insertion point or space between text ?
I mean...if you select an MTEXT who have multiline with simple Dtext ..the spacing will take
the insertion of it and have as result a text over an MTEXT.

maybe by using textbox or boundingbox you can catch the textframe ?

Just a suggestion... :angel:

Yeah, as you might have guessed, I am using the InsertionPoint/AlignmentPoint to space the text, perhaps a bounding box method would be better, but this would get complicated for text that is not aligned Vertically or Horizontally...   :angel:


I have updated the code in the first post to Version 1.1, now the user can specify the Text Spacing  8-)
Sweet!!!  8-)
I will play with it when I get to work and get a chance.  Home with a sick kid

Thanks Krushert, hope he/she gets better soon  :-)