Lisp file problem if loaded on 2000i

Discussion in 'AutoCAD' started by Viliam, Aug 13, 2004.

  1. Viliam

    Viliam Guest

    This code does not change the dimscale if run in Model space!! The
    problem is with 2000i only!

    ;;;;;;;;;;;;;;start;;;;;;;;;;;;;;;;;;;;;;
    (defun scaling ()
    (if (eq (getvar "tilemode") 1)
    (progn
    (setq Dim-scale (if (eq (getvar "dimscale") 0) 1 (getvar "dimscale")))

    (setq Scale-key (strcat "\n Scale Factor <" (rtos Dim-scale) ">:"))
    (setq Scale (cond ((getreal Scale-key))(t Dim-scale)))
    );progn
    (progn (if (eq (getvar "CVPORT") 1) (setq Scale 1) (setq Scale (/ 1
    (xpfact))))
    )
    )
    (setvar "DIMSCALE" Scale)
    (princ)
    )
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    (defun xpfact () ;by Tony Tanzillo
    (- (car (trans '(1 0 0) 2 3))
    (car (trans '(0 0 0) 2 3))
    )
    ;(princ)
    ); end of xpfact
    ;;;;;;;;;;;;;;;;;;;end;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


    I am loosing it why is this happening? When auto loading with Appload
    Suite, or acad.lsp, or even if directly loaded inside mymenu.mnl
    the file will not change the dimscale. If the user is "manually" loading
    the file (via drag and drop explorer/Acad), the file will execute.

    Not sure if am clear on this, there is no problem with "unknown
    command". it will not change the dimscale if the (scaling) is run in
    Model space! Worst thing that I can not reproduce it. It is happening to
    one user on 2000i, (tried it with XP, W98)two diff. boxes with same results!

    Any help will be appreciated

    Viliam
     
    Viliam, Aug 13, 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.