on_doc_load.lsp not loading

on_doc_load.lsp does not load on my 14.1.11 32 bit?

(Ditto on earlier version as well) Yes, Support File Paths are correct.

Works fine on my 64 bit box.

Bug or configuration issue on this machine?

Comments

  • Configuration issue.
    As a starting point I would try:
    [code](findfile "on_doc_load.lsp")[/code]
  • It "sees" it in proper support path.

    "C:\\Program Files\\Bricsys\\BricsCAD V14 en_US\\Support\\on_doc_load.lsp"

  •  on_start.lsp and on_doc_load.lsp must sit in the BricsCAD program folder, by default: C:\Program Files\Bricsys\Bricscad V14.
  • Mine doesn't seem to exist by default (32 bit), except there is on_doc_load_default.lsp and on_start_default.lsp in C:\Program Files\Bricsys\BricsCAD V14 en_US\Support.

    Hadn't noticed that because I maintain my own in a dir (C:dwgs) which is the directory I have set Bcad to start in.

    It always loads unless I open Bcad by double clicking on a file.


  • I copied file to Bricscad V14 root folder, still does not load.
  • "on_doc_load.lsp" (and the other default Lisp files) only need to be found by (findfile), as Roy mentioned -
    they must not reside in BricsCAD root folder.

    Using double-click to start BricsCAD does not set the "execute in" condition as the desktop icon does;
    I would assume, that "execute in" folder is set to the folder of the double-clicked dwg file, or to BricsCAD application
    folder (likely the latter); the "execute in" folder is the "active OS directroy" or "current working dir" for the BricsCAD process,
    as created by the Windows system.

    @Robt
    Have you checked which BricsCAD version starts by double-click - x86 or x64, if you have both parallel ?
  • Hi Torsten

    Only x86 versions (of v14, v13) installed on 32 bit laptop.

    (Yes, on_doc_load.lsp fails to load in v13 as well)

  • Hi Robt.


    It "sees" it in proper support path.

    "C:\\Program Files\\Bricsys\\BricsCAD V14 en_US\\Support\\on_doc_load.lsp"

    You are saying that the 32bit version is finding on_do_load.lsp in the 64bit support location? I wouldn't recommend pointing the 32bit version at the 64bit folders, and vice-versa. This may lead to unexpected results, and confusion.

    I would recommend that you place all your customisation in a distinct location outside of the programs area. e.g. C:\My_BCAD_Library . Then create a user profile and include this folder(s) on your support file search path.

    Louis isn't correct about on_start.lsp and on_doc_load.lsp location. BricsCAD loads the first instance found of these files in the following order:
    1. The folder of the current drawing. Believe this applies to on_doc_load.lsp only
    2. The "Start-In" folder. If you are starting BricsCAD from the desktop shortcut, then this would most likely be "C:\Program Files\Bricsys\BricsCAD V14 en_US\", which would explain Louis comment. However if you launch BricsCAD by double clicking on a drawing file in windows explorer, then that folder will be your "Start-In".
    3. In each folder of your support file search path (getenv "ACAD"), in the order they are listed.
    If your on checking your configuration you find that on_doc_load.lsp is still not loading correctly, then I would try copying this file to a folder with a drawing file in it. Close BricsCAD down, then launch BricsCAD by double clicking on the file in windows explorer. If you have 32 & 64 bit versions installed, then you may need to right click on the file and use the "Open with" option. This should load the on_doc_load.lsp located in the drawing folder.

    In terms of checking on_doc_load you may like to try adding some calls to confirm that it is loading. e.g.
    [code](princ "\nOn_Doc_Load.lsp Loading...") ; this will tell me that on_doc_load has started
    .
    .
    (load "somelisp")
    (load "somemorelisp")
    .
    .
    (princ "\nOn_Doc_Load.lsp Loaded...") ; this will tell me that on_doc_load has completed
    (prin1)[/code]


    Regards,

    Jason Bourhill

    CAD Concepts
  • "You are saying that the 32bit version is finding on_doc_load.lsp in the 64bit support location?"

    No, only x86 version loaded on the 32 bit machine "C:\\Program Files\\Bricsys\\BricsCAD V14 en_US\\Support\\".

    An arbitrary entry put in the 'on_doc_load' is (setvar "OSMODE" 695).

    OSMODE does not change to "695" when dwg opens (regardless of opening desktop icon or .dwg file), nor do any lisp routines load.

    (Curious, as stated, all works fine on my 64 bit machine)

    Regards

  • Dear Robt,
    ok, so you obviously have 32 bit Windows :-)
    I assume, (findfile "on_doc_load.lsp") does correctly point to your intended file ?

    Add a simple
    (alert "on_doc_load.lsp")
    as first line in your on_doc_load.lsp to see whether it is loaded or not ...

    It could happen, that some Lisp code inside on_doc_load.lsp fails during load of on_doc_load.lsp, so you get the impression
    that it is not loaded ... recognised such scenarios sometimes :-)

    Many greetings !
  • Hi Robt,

    Ok, so you have a machine with 32bit version of Windows loaded? I have only 64bit windows, and on this both the 32bit & 64bit versions run and load fine.

    Have you tried placing the on_doc_load.lsp in a folder with a .dwg and launching BricsCAD from there?
    If findfile is returning the correct location. have you tried force loading? e.g.
    [code](load (findfile "on_doc_load.lsp"))[/code]

    I would also start with a minimal on_doc_load.lsp e.g.
    [code]; Minimal On_Doc_Load.lsp
    (princ "\nOn_Doc_Load.lsp Loading...\n") ; this will tell me that on_doc_load has started
    (alert "on_doc_load.lsp") ; Torstens suggestion. Harder to miss :-) !
    (princ (setvar "OSMODE" 695)) ; set object snaps
    (princ "\nOn_Doc_Load.lsp Loaded...") ; this will tell me that on_doc_load has completed
    (prin1)[/code]
    as potentially it could be an issue with one of the functions that is being loaded.

    I would also try a creating a different profile as potentially it is a settings issue within your existing profile.

    As previously mentioned would also not save any customisation under C:\Program Files. It is better to create your own location for this e.g. C:\My_BCAD_Library.


    Regards,

    Jason Bourhill

    CAD Concepts
  • Hi Torsten

    Invoking (load (findfile "on_doc_load.lsp")) yields "C:\\Program Files\\Bricsys\\BricsCAD V14 en_US\\Support\\on_doc_load.lsp".

    "Add a simple (alert "on_doc_load.lsp")" It is not loading.

    @ Jason:

    "Have you tried placing the on_doc_load.lsp in a folder with a .dwg and launching BricsCAD from there?"

    Yup, I've opened it from desktop, file location, I've opened it in a box, I've opened it with a fox.....

    "I would also try a creating a different profile ..."

    I loaded "default" User profile....no change.

    I've run the msi installer's "repair option"....no change

    (Curious that this phenominon exists in v13 x86 as well?

    Thanks all for your efforts

  • Ok, I dug out an old machine with Windows XP 32bit and installed BricsCAD V14.1.11. Launched it with a test on_doc_load.lsp (see attached) and it worked fine. Got the following results

    On_Doc_Load.lsp Loading...
    Alert message displayed
    695
    On_Doc_Load.lsp Loaded...

    I suggest that you uninstall BricsCAD from this machine, then re-install. After uninstall make sure that you remove any remaining files in
    C:\program files\Bricsys\BricsCAD V14...

    and remove any files in your use application data folder. You can find this by typing %APPDATA% into the folder address area of windows explorer. Once there browse to Bricssys\BricsCAD\V14

    When you re-install BricsCAD
    • Don't let it migrate settings from previous versions of BricsCAD.
    • Don't Launch BricsCAD on completion of install.
    • After install run the User Profile Manager from Windows Start|Programs|BricsCAD V14. Once their create a new profile (don't copy any existing), and double click to launch BricsCAD.
    • Don't try importing an existing V13 profile, or a V14 x64 profile. It doesn't work.
    Having done this try launching BricsCAD from your test on_doc_load location.

    If you have more than one BricsCAD version loaded, make sure you have launched the correct one.
    [code](getvar '_vernum)[/code]
    Will return the current BricsCAD version.
    You can use
    [code](vle-lispversion)[/code]
    to check whether it's x86 or x64


    Regards,

    Jason Bourhill

    CAD Concepts

    on_doc_load - Test(2).zip

  • @ Robt:
    Since you are not able to load the Lisp file I think you should look at the file itself. I have had some rare cases where a Lisp file would not load properly because it was not a correct Windows plain text file.

  • @Robt,
    thanks for details ... sounds very strange, I also agree with Roy, maybe it is the file itself ? Could you attach it here (as ZIP) ?

    Also, as addition to Jason's hints : if you run the V13 .exe installer, start this with "run as admin" ... also, check the "Run as Admin" option in deskop icon.
    To force BricsCAD to use a specific profile - the desktop command line argument "/p
    "bricscad.exe /p MyDefault"

    Besides, try a chkdsk on you C drive, maybe the MFT/Directory is damaged (often happens after a crash).

    Many greetings !

  • @ Roy:
    "Lisp file ....not a correct Windows plain text file."
    Files (within on_doc_load) load fine manually (using APPLOAD, or drag-drop).
    @ Torsten:
    "if you run the V14 .exe installer, start this with "run as admin""
    Installer is not .exe, rather an .msi (Run As Admin not an option).
    "try a chkdsk"
    Done, no issues.
    @ Jason:
    "I suggest that you uninstall BricsCAD from this machine, then re-install"
    Yup, I considered that as last resort.
    I'll do just that when I get a spare couple hours.

    Thanks, Regards all
  • Ha!
    Something must have been horribly corrupted; uninstall (and thorough lavage of v14 remnants), subsequent reinstall cured it.

    Hallelujah.

    Again Thanks, Regards all


This discussion has been closed.