Getting TEXT height value that is set in Text style dialog box

Discussion in 'AutoCAD' started by RaghuMN, Sep 17, 2003.

  1. RaghuMN

    RaghuMN Guest

    Hi all,

    When the text height is set for a text style in the 'Text style' dialog box, the 'Text height' is not prompted during the TEXT command.

    This is a big problem when the TEXT is being put programatically; the program that contains a sentence like (COMMAND "TEXT" IPT 10 0 "ABCDEF") fails when the height in current style is set with 10 (example).
    Can any one suggest me how to find programatically if text height is set in text style dialog box?
     
    RaghuMN, Sep 17, 2003
    #1
    1. Advertisements

  2. (cdr (assoc 40 (entget (tblobjname "style" "TextstyleNameHere"))))
     
    Jason Piercey, Sep 17, 2003
    #2
    1. Advertisements

  3. RaghuMN

    DonB Guest

    Using Jason's method...



     



    Returns T if height is set.



     



    (defun TextSizeSet ()
      (not
        (zerop
          (cdr
           (assoc 40
              (entget (tblobjname "style" (getvar "textstyle")))
           )
          )
        )
      )
    )



     



    Don



     



    "RaghuMN" <> wrote in message news:...

    Hi all,

    When the text height is set for a text style in the 'Text style' dialog box, the 'Text height' is not prompted during the TEXT command.

    This is a big problem when the TEXT is being put programatically; the program that contains a sentence like (COMMAND "TEXT" IPT 10 0 "ABCDEF") fails when the height in current style is set with 10 (example).
    Can any one suggest me how to find programatically if text height is set in text style dialog box?
     
    DonB, Sep 17, 2003
    #3
  4. RaghuMN

    RaghuMN Guest

    Thanks Jason and Don. That works fine.

    MNRaghu
     
    RaghuMN, Sep 18, 2003
    #4
    1. Advertisements

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.