+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Full Member
    Using
    Map 3D 2008
    Join Date
    Mar 2008
    Posts
    49

    Default Horizontal fraction

    Registered forum members do not see this ad.

    Hello,

    How to get horizontal fraction instead of diagonal 25/3 using the Lisp?

    This is little part of my code:

    (vl-cmdf "-MTEXT" point "j" "tl" "r" "0" "W" 0 "25/3" "")

    I need this:

    25
    --
    3

    Any solutions?

  2. #2
    Forum Deity
    Using
    Civil 3D 2013
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    3,791

    Default

    I think you can do it maybe by using a script
    eg

    _mtext
    0,0
    H
    2.5
    100,100
    alan
    is
    good

    you can call scripts from within lisp but you can not renter

  3. #3
    Full Member
    Using
    Map 3D 2008
    Join Date
    Mar 2008
    Posts
    49

    Default

    Well, thank you, but it is not about writing text in new lines. I want text written as 1/3 to be shown as fraction.

    There is an option in text formating window named "Stack" (in ACad Map 2009). I want to use it in lisp code.

    Any suggestion?

    Quote Originally Posted by BIGAL View Post
    I think you can do it maybe by using a script
    eg

    _mtext
    0,0
    H
    2.5
    100,100
    alan
    is
    good

    you can call scripts from within lisp but you can not renter

  4. #4
    Senior Member
    Using
    not applicable
    Join Date
    May 2007
    Posts
    126

    Default

    Code:
    (and (setq TextHeight (getdist "\nSpecify text height: "))
         (setq Point (getpoint "\nSpecify insertion point: "))
         (setq Num "1/3")
         (entmake (list (cons 0 "MTEXT")
    		    (cons 100 "AcDbEntity")
    		    (cons 100 "AcDbMText")
    		    (cons 1 (strcat "\\A1;{\\S" Num ";}"))
    		    (cons 10 Point)
    		    (cons 40 TextHeight)
    		    (cons 50 0.0)
    		    (cons 71 5)
    		    (cons 72 5)
    	      )
         )
    )

  5. #5
    Full Member
    Using
    Map 3D 2008
    Join Date
    Mar 2008
    Posts
    49

    Default

    Registered forum members do not see this ad.

    That's it! Really good job VovKa.
    Thank you very much!



    Quote Originally Posted by VovKa View Post
    Code:
    (and (setq TextHeight (getdist "\nSpecify text height: "))
         (setq Point (getpoint "\nSpecify insertion point: "))
         (setq Num "1/3")
         (entmake (list (cons 0 "MTEXT")
                (cons 100 "AcDbEntity")
                (cons 100 "AcDbMText")
                (cons 1 (strcat "\\A1;{\\S" Num ";}"))
                (cons 10 Point)
                (cons 40 TextHeight)
                (cons 50 0.0)
                (cons 71 5)
                (cons 72 5)
              )
         )
    )

Similar Threads

  1. how to make decimal to fraction in lisp??
    By vasqrainier in forum AutoCAD General
    Replies: 8
    Last Post: 10th Nov 2006, 04:59 am
  2. horizontal line
    By JEYM in forum AutoCAD Beginners' Area
    Replies: 3
    Last Post: 11th Jul 2006, 10:22 pm
  3. Text Override with fraction
    By edwin in forum AutoCAD Drawing Management & Output
    Replies: 2
    Last Post: 16th Jan 2006, 03:35 pm
  4. horizontal scroll bar
    By xavier in forum AutoCAD Drawing Management & Output
    Replies: 1
    Last Post: 19th Apr 2005, 05:50 pm
  5. %%201, %%202 and so on.... Fraction Dimension
    By richjenn03 in forum AutoCAD Drawing Management & Output
    Replies: 0
    Last Post: 28th Feb 2005, 10:51 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts