How to know total style font

Discussion in 'AutoCAD' started by Adesu, Sep 22, 2004.

  1. Adesu

    Adesu Guest

    I just load style font in drawing current,as like
    "arial,century,curier,isoct and italic",and then I want to know by
    program,how to identification again this style,because if we used
    (setq stylefont (getvar "textstyle")),the result only one style,last load,I
    mean and I want are

    $ (setq textstyle (getvar "textstyle"))
    "italic"

    $ (setq textstyle ???????) >>>>>>I want like this,is it
    possible do it
    "arial,century,curier,isoct and italic"
     
    Adesu, Sep 22, 2004
    #1
  2. Adesu

    dblaha Guest

    Try this routine that was posted a while back:

    ;Written By Michael Puckett.
    (defun Table (s / d r)
    (while (setq d (tblnext s (null d)))
    (setq r (cons (cdr (assoc 2 d)) r))
    )
    )

    (table "style")



    Dave
     
    dblaha, Sep 22, 2004
    #2
  3. Adesu

    Adesu Guest

    Hi dblaha ,very nice,I glad receive that,thanks a lot

    _$ (defun Table (s / d r)
    (while (setq d (tblnext s (null d)))
    (setq r (cons (cdr (assoc 2 d)) r))
    )
    )

    (table "style")
    TABLE
    ("impact" "hvbo" "garamond" "curier new" "complex" "century" "arial"
    "Standard")
    _$
     
    Adesu, Sep 23, 2004
    #3
  4. Adesu

    dblaha Guest

    You're welcome. I'm glad I could help.

    Dave
     
    dblaha, Sep 23, 2004
    #4
  5. Adesu

    Adesu Guest

    Hi dbalaha,can you help me ,how this program work,I am not
    understanding,thanks

    ;Written By Michael Puckett.
    (defun Table (s / d r)
    (while (setq d (tblnext s (null d)))
    (setq r (cons (cdr (assoc 2 d)) r))
    )
    )
     
    Adesu, Sep 27, 2004
    #5
  6. Adesu

    dblaha Guest

    This routine steps through each member of a table (the name of which you supply and is assigned to the variable 's').
    In this line of the routine it uses the TBLNEXT function to read each member of the table name.

    ;(setq r (cons (cdr (assoc 2 d)) r))
    In this line, it uses ASSOC to extract the name of the current table member (stored with the DXF code 2) and uses CONS to add the name to its list stored in the variable r.

    The routine then goes back to the top of the 'while' loop and keeps repeating this process until SETQ D does not equal nil, which would indicate it had reached the end of the table.

    Dave
     
    dblaha, Sep 27, 2004
    #6
  7. Adesu

    dblaha Guest

    Oops! My last statement in my above post should have read:

    The routine then goes back to the top of the 'while' loop and keeps repeating this process until SETQ D equals nil, which would indicate it had reached the end of the table.


    Time for more caffiene...

    Dave
     
    dblaha, Sep 27, 2004
    #7
  8. Adesu

    Adesu Guest

    Hi dblaha,thanks a lot for your help

    repeating this process until SETQ D equals nil, which would indicate it had
    reached the end of the table.
     
    Adesu, Sep 28, 2004
    #8
  9. Adesu

    Adesu Guest

    Hi dblaha,I thought the key this program is on "while",is it true,because if
    we "while" disappeared in this program ,it can't run

    supply and is assigned to the variable 's').
    member (stored with the DXF code 2) and uses CONS to add the name to its
    list stored in the variable r.
    repeating this process until SETQ D does not equal nil, which would indicate
    it had reached the end of the table.
     
    Adesu, Sep 28, 2004
    #9
  10. Adesu

    dblaha Guest

    Yes. As I mentioned in the last part of my previous post, the 'while' loop keeps the routine running until the end of the table is reached.

    Dave
     
    dblaha, Sep 28, 2004
    #10
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.