Help with lisp routine that freezes

Discussion in 'AutoCAD' started by Servo, Sep 15, 2004.

  1. Servo

    Servo Guest

    This is a routine for drawing an xline using custom linetype. The dialog
    box comes up, but when I select one of the buttons to run the routine
    that draws the xline Autocad freezes.
    I cut and pasted the (defun tfdn....) routine to the command line and it
    works perfectly, but when I try to run it from a dialog box...no luck.
    TIA for any help!

    ;;;;Custom Linetypes Dialogue Box
    (defun c:cvgline ()
    (setq DCL_id (load_dialog "Cvgline.DCL"))
    (if (not (new_dialog "cvgline" DCL_id)) (exit))
    (mode_tile "exit" 2)
    ;
    TILE ACTIONS
    ;
    (action_tile "tfdn" "(done_dialog) (tfdn)")
    ;;;;SUB ROUTINES
    ;
    (defun tfdn ()
    (alert "Loaded")
    (unload_dialog DCL_id)
    (command "ortho" "on")
    (command "-layer" "m" "defpoints" "")
    (command "-insert" "*style" "0,0" "" "")
    (alert "Insert")
    (command "-style" "dim-text" "" "" "" "" "" "" "")
    (alert "Dim-Text")
    (command "setvar" "celtype" "CONSTR_LINE_FDN_0")
    (alert "Linetype Constr")
    (command "setvar" "cecolor" "252")
    (alert "Color 252")
    (command "xline" "h" "\\" ^c^c)
    (command "setvar" "celtype" "bylayer")
    (alert "Linetype bylayer")
    (command "setvar" "cecolor" "bylayer")
    (alert "Color bylayer")
    )
    ;
    (start_dialog)
    (unload_dialog DCL_id)
    (princ)
    )
    --
    Servo
    "You gonna do something? Or just stand there and bleed?"
    tservo100 at
    ameritech dot net
    Slow, fiery death to all spammers!!!
     
    Servo, Sep 15, 2004
    #1
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.