Author Topic: acaddoc vs mnl files  (Read 1912 times)

0 Members and 1 Guest are viewing this topic.

andrew_nao

  • Guest
acaddoc vs mnl files
« on: July 13, 2009, 10:12:48 AM »
lets say i want to load a lisp file on dwg startup
is it better to load it from the acaddoc or the .mnl?

does anyone know or has anyone done any testing to see what one makes opening dwgs faster? or doesnt it matter

i have alot of lisp files that i need to be loaded on dwg startup and it slows the opening of the dwgs down and im just looking for ways to optimize the opening of the dwgs by eliminating some that dont really need to be loaded on dwg startup but need to be loaded eventually for that dwg.
some of the cad operators use keyboard shortcuts so the lisp needs to be loaded right away for them.

anyone have any suggestions on how to speed somethings up?

tia

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: acaddoc vs mnl files
« Reply #1 on: July 13, 2009, 10:28:29 AM »
Here is the order I use:

For one-off loading of applications, I use acad.lsp, for applications needed for each drawing (most lisps) it is preferable to use acaddoc.lsp, for lisps required to support a specific menu, the proper place would be in the .mnl

I rarely use .mnl files for loading of lisp (others may use it exclusively) mainly because when utilizing multiple menus, it is entirely possible that a specific menu may not be loaded and thus the lisp may not be loaded.

Now that we have talked about that, lets talk about the startup suite. For each user profile, the startup suite specifies which applications to load. For a housekeeping lisp, such as you have here, you may want to put it in the startup suite and have it load only on a specific profile. If you want to make it autoexecute, you can add another line at the end of the file like such:

Code: [Select]
(my_app_name and any args)
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

deegeecees

  • Guest
Re: acaddoc vs mnl files
« Reply #2 on: July 13, 2009, 10:44:35 AM »
Divide your lisps into logical groupings, then only load the one's you need at startup. For the others, load them with mnl's when needed. Also, look into "autoload".

GDF

  • Water Moccasin
  • Posts: 2085
Re: acaddoc vs mnl files
« Reply #3 on: July 13, 2009, 10:56:04 AM »
Here is how I load files:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Following is a list of AutoCAD, Express Tools, and user-defined files in
;;; the order they are loaded when you first start the program. Go to AutoCAD
;;; Help and search for "support file loading" (including quotes) and the
;;; top result is "Order of support file loading" which nets the following:
;;;      <File For:>       <Use By:>
;;;      acad2000.lsp       AutoCAD
;;;      acad.rx          User
;;;      acad.lsp       User
;;;      acad2000doc.lsp       AutoCAD
;;;      acetutil.fas       Express Tools
;;;      acaddoc.lsp       User
;;;      mymenu.mnc       User
;;;      mymenu.mnl       User
;;;      acad.mnc       AutoCAD
;;;      acad.mnl       AutoCAD
;;;      acetmain.mnc       Express Tools
;;;      acetmain.mnl       Express Tools
;;;      s::startup       User
;;; Note: If the user-defined function S::STARTUP is included in the acad.lsp or
;;; acaddoc.lsp file or a MNL file, the function is called when you enter a new
;;; drawing or open an existing drawing. Thus, you can include a definition of
;;; S::STARTUP in the LISP startup file to perform any setup operations. For more
;;; information about the s::startup function, refer to the Customization Guide.
;;;
;;; It should be noted that Autodesk's website is misleading about the load order.
;;; The menus load in the order they were initially loaded in, and *not* always
;;; the user menu first. The only way the user menu loads first is if all menus
;;; were removed and the user's menu was loaded first, then the other menus
;;; subsequently. In most cases people tend to leave Acad's menu there, then
;;; Express Tools (if installed), and then finally the user's menu.
;;; This can be verified by watching the menu load prompts:
;;; AutoCAD menu utilities loaded.
;;;
;;; Key files to needed to run this program:
;;; (1.) The "ACAD.lsp" file sets the path for the arch program along with the saved autocad
;;;     environment settings for a clean restore to generic autocad when the arch program
;;;     is unloaded. This is the only file that must be located at each workstation within
;;;     the autocad support directory. It only loads at AutoCAD startup.
;;; (2.) The "ACADDOC.lsp" loads the "ARCH_INITIALIZE.fas" file.
;;; (3.) The "ARCH_INITIALIZE.fas" initialize the setup.
;;; (4.) Custom settings are controled by the "custom_xxx.lsp" file.
;;; (5.) The "ARCH.mnc" loads the "ARCH.mnl" file automatically which contains many
;;;     misc functions required to operate this program.
;;; (6.) The "ARCH_SUBROUTINES.fas" contains all of the subfunctions.
;;; (7.) All bitmaps for the toolbars are compiled in the "ARCH.dll" which is loaded
;;;     automatically.
;;; (8.) The "ARCH.dcl" file must be located in the acad support file search path
;;;     it contains all of the dialog box widgets for the arch program.
;;;     @include "..\\ARCH.dcl"
;;;
;;;
;;; General Rule is to NOT edit the acad200Xdoc.lsp file because it is an Autocad file
;;; that CAN and WILL be replaced if you install patches. I would suggest using the
;;; acaddoc.lsp for the code. Following is a list of AutoCAD, Express Tools, and
;;; user-defined files in the order they are loaded when you first start the program.
;;;
;;; File         For use by:    
;;; acad200X.lsp AutoCAD    
;;; acad.rx         User    
;;; acad.lsp User    
;;; acad200Xdoc.lsp AutoCAD    
;;; acetutil.fas Express Tools    
;;; acaddoc.lsp User    
;;; mymenu.mnc User    
;;; mymenu.mnl User    
;;; acad.mnc AutoCAD    
;;; acad.mnl AutoCAD    
;;; acetmain.mnc Express Tools    
;;; acetmain.mnl Express Tools    
;;; s::startup User
;;;
;;; To make sure you are pulling the correct acaddoc.lsp copy and paste the following
;;; line to the command line (findfile "acaddoc.lsp") You should get the path returned
;;; and if it is not where you think the file is installed you have more than one file.
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

GDF

  • Water Moccasin
  • Posts: 2085
Re: acaddoc vs mnl files
« Reply #5 on: July 13, 2009, 12:49:22 PM »
This is what I use:

Code: [Select]
(defun ARCH:ALERT-I  (messagebox / applic)
  (vl-load-com)
  (setq applic (vlax-get-acad-object))
  (vla-eval
    applic
    (strcat messagebox ", " "vbInformation" ", " "\"" ARCH#LOGO
            " : Information                    \""))
  (vlax-release-object applic)
  (princ))
;;;(ARCH:ALERT-I "MsgBox \"Hello Everybody\"")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;; Find Lisp Routine for Loader Function ;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun ARCH:LOAD  (FIND)
  (cond
    ((findfile FIND) (load FIND))
    (t
     (progn
       (menucmd "GARCH.ID_ARCH=~")
       (ARCH:ALERT-I
         "MsgBox \"
     File could not be Found.
--------------------------------------------------------------------------------------------
     This Routine could not be found on the network...
     Please notify Admin to correct the problem.\"")
       (princ "\n*** ///////// Program  CANCELLED ///////// ***")))))
;;;
;;;usage (ARCH:LOAD (strcat ARCH#LAYF "ARCH_LAYS.lsp"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ARCH Startup ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;;;Typical autoload from my ARCH.mnl file:

(defun C:DLAY  ()
  (if (not C:DEL-LAYER)
    (ARCH:LOAD (strcat ARCH#LAYF "ARCH_LAYS.lsp")))
  (if C:DEL-LAYER
    (C:DEL-LAYER))
  (princ))




Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64