Author Topic: [wip] Explode mtext function  (Read 12467 times)

0 Members and 1 Guest are viewing this topic.

T.Willey

  • Needs a day job
  • Posts: 5241
Re: [wip] Explode mtext function
« Reply #15 on: July 15, 2009, 04:13:27 PM »
I knew those nested format codes would get me.  I guess I can go for them next.  Thanks for the example Vovka.  I don't use mtext, so I don't know how much trouble I was getting into.  Now I know, and I'm scared.  I'll see what I can do.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10388
Re: [wip] Explode mtext function
« Reply #16 on: July 15, 2009, 04:44:03 PM »
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.

T.Willey

  • Needs a day job
  • Posts: 5241
Re: [wip] Explode mtext function
« Reply #17 on: July 15, 2009, 04:48:39 PM »
Updated code in first post.

May be of some help.
http://www.theswamp.org/index.php?topic=7272.0

Thanks Alan.  Will take a look and see how you did it.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10388
Re: [wip] Explode mtext function
« Reply #18 on: July 15, 2009, 05:22:55 PM »
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.

VovKa

  • Swamp Rat
  • Posts: 1247
  • Ukraine
Re: [wip] Explode mtext function
« Reply #19 on: July 15, 2009, 06:04:00 PM »
and more to think over
Code: [Select]
(entmake
  '((0 . "MTEXT")
    (100 . "AcDbEntity")
    (67 . 0)
    (410 . "Model")
    (8 . "0")
    (100 . "AcDbMText")
    (10 20.5909 157.984 0.0)
    (40 . 2.5)
    (41 . 59.0253)
    (71 . 8)
    (72 . 5)
    (1
     .
     "{\\fArial|b0|i0|c204|p34;my name is \\fArial|b0|i1|c0|p34;VovKa\\P\\pt17.5;\\fArial|b0|i0|c0|p34;\\H2x;\t\\\\hello\\\\}"
    )
    (7 . "Standard")
    (210 0.0 0.0 1.0)
    (11 1.0 0.0 0.0)
    (42 . 36.1392)
    (43 . 13.5039)
    (50 . 0.0)
    (73 . 1)
    (44 . 2.0)
   )
)

Lee Mac

  • Seagull
  • Posts: 12390
  • London, England
Re: [wip] Explode mtext function
« Reply #20 on: July 15, 2009, 06:08:26 PM »
VovKa,

What does the p34 do/mean?

*just curious*

Lee

VovKa

  • Swamp Rat
  • Posts: 1247
  • Ukraine
Re: [wip] Explode mtext function
« Reply #21 on: July 15, 2009, 06:44:53 PM »
Lee Mac, i guess it's telling that the font is unicode.

T.Willey

  • Needs a day job
  • Posts: 5241
Re: [wip] Explode mtext function
« Reply #22 on: July 15, 2009, 07:03:34 PM »
I'm almost there Vovka.  :wink:
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

T.Willey

  • Needs a day job
  • Posts: 5241
Re: [wip] Explode mtext function
« Reply #23 on: July 15, 2009, 07:09:42 PM »
Updated code in first post.   :-)
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

T.Willey

  • Needs a day job
  • Posts: 5241
Re: [wip] Explode mtext function
« Reply #24 on: July 15, 2009, 07:13:12 PM »
Spoke a little too soon.  I got the part I thought I needed to get, and didn't realize that you change the alignment of the text.  I will have to see if I can get to that issue tomorrow.

Nice touch there Vovka.  Sneaky like a ninja.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

kdub

  • Mesozoic relic
  • SuperMod
  • Swamp Rat
  • Posts: 1379
  • class keyThumper<T>:ILazy<T>
Re: [wip] Explode mtext function
« Reply #25 on: July 15, 2009, 08:05:52 PM »

sounds like it's time to use the c#NET MText.ExplodeFragments method in a wrapper for Lisp :)

///kdub
called Kerry in my other life

Sometimes the question is more important than the answer.
#ridesober

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: [wip] Explode mtext function
« Reply #26 on: July 16, 2009, 06:31:56 AM »
The Tab isn't recognised yet ..

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<--

T.Willey

  • Needs a day job
  • Posts: 5241
Re: [wip] Explode mtext function
« Reply #27 on: July 16, 2009, 11:13:58 AM »
I was looking at other stuff to write wrappers for also, but didn't know where to start.  This might be a good one to start with.  Thanks for the idea Kerry.  Sucks about the Tab though.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

T.Willey

  • Needs a day job
  • Posts: 5241
Re: [wip] Explode mtext function
« Reply #28 on: July 16, 2009, 11:56:48 AM »
Updated code in first post.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

VovKa

  • Swamp Rat
  • Posts: 1247
  • Ukraine
Re: [wip] Explode mtext function
« Reply #29 on: July 16, 2009, 12:22:04 PM »
stab in the back :)
Code: [Select]
(entmake
  '((0 . "MTEXT")
    (100 . "AcDbEntity")
    (67 . 0)
    (410 . "Model")
    (8 . "0")
    (100 . "AcDbMText")
    (10 198.152 203.61 0.0)
    (40 . 2.5)
    (41 . 53.7689)
    (71 . 5)
    (72 . 5)
    (1
     .
     "\\pi-7.5,l7.5,t30;{\\fArial|b0|i0|c0|p34;test\\\\test\t\\H0.6878x;\\Stest/test;\\H1.454x;                                \\P\\pi-17.5,l17.5;\\P                                               \\\\test}"
    )
    (7 . "Standard")
    (210 0.0 0.0 1.0)
    (11 1.0 0.0 0.0)
    (42 . 97.7908)
    (43 . 6.33333)
    (50 . 0.0)
    (73 . 2)
    (44 . 0.36)
   )
)
even "EXPLODE" command cannot get it right