ttf in lsp malfunction

Discussion in 'AutoCAD' started by Steve Voorhees, Feb 6, 2004.

  1. when I use the "command" to set style in lsp to arial for my style title it gets substituted with my default acad font of romans. When I close out of the drawing and re-open it I have it back. Some where I am loosing my font support when in lsp using the command entry. The code looks like this:

    (defun C:gridbub ()
    (setvar "cmdecho" 0)
    (setq la (getvar "clayer"))
    (command "osnap" "ENDP")
    (setq tin (getvar "textstyle"))
    (command "style" "TITLE" "" "" "" "" "" "" "")
    (setq sc (getvar "userr1")
    pa (getpoint "\nPick grid buble centerpoint: ")
    tx1 (getstring T "\nEnter grid buble text: ")
    ra (* sc 3.00)
    hi (* sc 2.25)
    )
    (command "layer" "s" "S-ANNO-TEXT" ""
    "circle" pa ra
    "layer" "s" "S-ANNO-TEXT" ""
    "text" "m" pa hi "0.0" tx1
    )
    (command "layer" "s" la "")
    (command "style" "STANDARD" "" "" "" "" "" "" "")
    (command "osnap" "off")
    (princ)
    )

    any comments??????
     
    Steve Voorhees, Feb 6, 2004
    #1
  2. Steve Voorhees

    favline Guest

    Have you tried hardcoding your font when
    you make your style "Title" instead of using
    a return- "". You might get lucky.....
     
    favline, Feb 6, 2004
    #2
  3. Steve Voorhees

    zeha Guest

    Why not (setvar "textstyle" tin) on the end of the functie

    I have modified the function, hope that the problem is losted.

    (defun C:gridbub ( / la tin pa tx1 ra hi os)
    (setvar "cmdecho" 0)
    (setq la (getvar "clayer"))
    (setq os (getvar "osmode"))
    (command "osnap" "ENDP")
    (setq tin (getvar "textstyle"))
    (if (not (tblsearch "style" "TITLE"))
    (command "style" "TITLE" "" "" "" "" "" "" "")
    )
    (setq sc (if (> (getvar "userr1") 0)(getvar "userr1")(getvar "dimscale"))
    pa (getpoint "\nPick grid buble centerpoint: ")
    tx1 (getstring T "\nEnter grid buble text: ")
    ra (* sc 3.00)
    hi (* sc 2.25)
    )
    (command "-layer" "m" "S-ANNO-TEXT" ""
    "circle" pa ra
    "-layer" "s" "S-ANNO-TEXT" ""
    "text" "m" pa hi "0.0" tx1
    )
    (setvar "clayer" la)
    (setvar "osmode" os)
    (setvar "textstyle" tin)
    (princ)
    )
     
    zeha, Feb 6, 2004
    #3
  4. Steve Voorhees

    ECCAD Guest

    Steve,
    I think you need to 'specify' the Arial font name..e.g.

    (command "style" "TITLE" "Arial.ttf" "" "" "" "" "" "")

    Bob
     
    ECCAD, Feb 6, 2004
    #4
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.