Different text style my program can't work

Discussion in 'AutoCAD' started by Adesu, Mar 17, 2005.

  1. Adesu

    Adesu Guest

    I just used my program,but this program can't work,after check what happened
    do it,the text style set to "romb",and then I set to "standard",and test
    again my program,now it work.
    my question is why with different text style this can't work,any
    comment?,thanks

    ; ct is stand for create text
    ; Design by Ade Suharna <>
    ; 17 January 2005
    ; Program no.164/01/2005
    ; Edit by
    (defun c:ct (/ loc hei str)
    (while
    (setq loc (getpoint "\nCLICK LOCATION FOR OBJECT: ")
    hei (getreal "\nENTER NEW TEXT HEIGHT: ")
    str (getstring T "\nENTER NEW STRING: "))
    (command "_text" loc hei "" str "")
    )
    (princ)
    )
     
    Adesu, Mar 17, 2005
    #1
  2. Adesu

    Jeff Mishler Guest

    I would guess that the "romb" style has a fixed height so you are not
    prompted for one.
     
    Jeff Mishler, Mar 17, 2005
    #2
  3. Adesu

    Adesu Guest

    Thanks Jeff for your reply,may be yes,that text style set to text height for
    250,now my question again,if me or others user,set other text style with x
    height,and I forgot to do that,how to revised this program in order to know
    and able detect,so that text style can't adopt.
     
    Adesu, Mar 17, 2005
    #3
  4. Adesu

    Adesu Guest

    Hi.....,
    I just to solve

    ; ct is stand for create text
    ; Design by Ade Suharna <>
    ; 17 January 2005
    ; Program no.164/01/2005
    ; Edit by Ade Suharna 17/03/2005 1).
    (defun c:ct (/ loc hei str)
    (setq txs (getvar "textstyle")) ; 1).
    (if (/= txs "standard")(setvar "textstyle" "standard"))
    (while
    (setq loc (getpoint "\nCLICK LOCATION FOR OBJECT: ")
    hei (getreal "\nENTER NEW TEXT HEIGHT: ")
    str (getstring T "\nENTER NEW STRING: "))
    (command "_text" loc hei "" str "")
    )
    (princ)
    (setvar "textstyle" txs) ; 1).
    )
     
    Adesu, Mar 17, 2005
    #4
  5. Why creating a program to put text in a drawing??

    Jan
     
    Jan van de Poel, Mar 17, 2005
    #5
  6. Adesu

    Adesu Guest

    Hi Jan ,first for simple command,second for to train create program
     
    Adesu, Mar 18, 2005
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.