fileopen causing problems

Discussion in 'AutoCAD' started by GaryDF, Nov 17, 2004.

  1. GaryDF

    GaryDF Guest

    I lose my S::Startup whenever I do the following at the command line.
    (command ".fileopen" "y" "v:\\arch\\bblocks\\div_02\\SP-ARW1.dwg")

    The drawing is opened...but the s::startup does not load my routines.
    Using AutoCAD 2005 Windows 2000

    There have been some issue where the S::STARTUP fails to load under these
    circumstances (info from Danny Hubbard Autodesk Product Support)
    1. Express Tools are installed
    2. You are working with SDI set to 1
    3. You are opening file via the Most Recently Used list, at the bottom of the
    File pull down menu.
    If you don't have the Express Tools installed or are working with SDI set to
    0, you will not see this problem generaly.

    My question is, what choices do I have when using fileopen command in lisp.
    Is there another way to do this (maybe with vlisp?) so I want lose my startup
    funtions.

    Gary
     
    GaryDF, Nov 17, 2004
    #1
  2. GaryDF

    petervose Guest

    I had a similar problem a while back, and it was solved using a reactor. Like many, reactors confuse the hell out of me, but I believe that if you place the following code into one of your startup files (xx.mnl, acaddoc.lsp or something similar) the reactor fires whether or not SDI is set to 1, and the s::startup executes - hopefully !!.

    (vlr-dwg-reactor "Drawing Opened" '(:)vlr-endDwgOpen . vcadstartfunc)))

    (defun vcadstartfunc (calling-reactor commandInfo / )
    (s::startup)
    )
     
    petervose, Nov 17, 2004
    #2
  3. GaryDF

    liftedaxis Guest

    just to be safe, particularly across versions of Acad, we do the following:

    (setvar "LISPINIT" 0)
    (command "_.FILEOPEN" "Y" filex)
    (setvar "LISPINIT" 1)
    (S::Startup)

    --Jeremiah
     
    liftedaxis, Nov 17, 2004
    #3
  4. GaryDF

    GaryDF Guest

    This fixed the problem of not having to use fileopen command.
    Thanks to another posted question from the guild.

    (defun xr-open-dwg (FileName /)
    ;by Luis Esquivel
    (vl-cmdf "._vbastmt"
    (strcat "AcadApplication.Documents.Open \""
    FileName
    "\"")
    )
    (princ)
    )

    Thanks Luis

    Gary

    many, reactors confuse the hell out of me, but I believe that if you place the
    following code into one of your startup files (xx.mnl, acaddoc.lsp or something
    similar) the reactor fires whether or not SDI is set to 1, and the s::startup
    executes - hopefully !!.
     
    GaryDF, Nov 17, 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.