Preface

Installation

Installation on your developers site

Recommended is to put all files into a seperate directory.

You DON'T necessarily need to add this directory to your AutoCAD Library Path!

(former called: "Acad support path"), the (getvar "ACADPREFIX"), because this is the worst behavior you might expect at the end users site. It might help though.

Modify your initialization lisp file (usually ACAD.LSP) to set the *MODULE-PATH* to make life easier. At the end-users site you should set the *MODULE-PATH* and/or *STDLIB-PATH* somehow, if via the registry, an INI file or the AutoCAD CFG file (currently checked at load-time). Best with your MNL file or worst with changing the end-users ACAD.LSP (not recommended).

In the examples I assumed the virtual directory L:\SRC\STDLIB\

(This is the actual position on my harddisc. L: is subst'ed on my harddisc and stands for "Lisp")

You may need only the FAS versions if your system can handle FAS files or the LSP sources plus other external extensions like BINIO, REGISTRY, INIFILE supported by ADS or ObjectARX modules, with either EXP, EXE or ARX extensions. However, put all into it, the system loads the best version which could be found.

How to load it from your lisp file?

In general you might load every module seperately or use projects.

Simpliest:

(if (not std-require)

(if *MODULE-PATH* ; faster findfile

    (load (strcat (car *MODULE-PATH*) "STDLIB"))

(load "STDLIB"))) ; it must be in the acad library path

(std-require "STDLIB")

This loads the whole library. It's wise to specify the global list of

directories *MODULE-PATH* in ACAD.LSP, which is a list of directories from

which you might load modules.

;;; in my ACAD.LSP. NOTE the ending slash!

(setq *MODULE-PATH* '("L:/src/stdlib/" "L:/src/"))

If you want only some portions, not the whole bunch:

(if (not std-require)

(if *MODULE-PATH* ; faster findfile

    (load (strcat (car *MODULE-PATH*) "STDINIT"))

(load "STDINIT"))) ; it must be in the acad library path

;;and now the modules you need

(std-require "STDSTR")
(std-require "STDENT")

or just:

(std-require "STDACI") ; load only ACad Independent Modules

STDINIT.LSP defines all the required predicates to check your AutoCAD release,

your OS platform, your autolisp version and defines the module loading code which

is used in the STDLIB.

(std-%simple-require "modulename") is used internally, it blindly assumes strings and the *MODULE-PATH* elements with ending slashes.

(std-require) accepts symbols too which might need less memory and uses the more foolproof std-load.

Installation on the end user side

Single file or multpile files?

Recommended is to use projects. which include the needed stdlib modules plus your application code. This way you'll have to distribute only one lisp file and you don#t have to check for version incompatibilities.

If you'll want to provide partial upgrades or independent modules you might consider seperate it into modules. But then the first part of the application must be able to find all other parts, which might be complicated if the user doesn't provide an entry in the Acad Library Path. You must get the absolute path somehow, best done by using the windows registry or inifiles or application loaders.

How to set the application directory?

There are numerous possibilities to get/set the end-users application directory:

Also the worst but simpliest methods:

As said above, you should set the *MODULE-PATH* and/or *STDLIB-PATH* somehow, if via the registry, an INI file or the AutoCAD CFG file (currently checked at load-time). Best with your MNL file or worst with changing the end-users ACAD.LSP (not recommended).

Note that you don't have to provide a stdlib copyright notice in your docs, but you may not delete it from the stdlib files or docs if you decide to ship them as well.

More developer considerations:

Fastest VLISP compilation

Use the stdlib/VLISP package and compile as optimized, localized, safe.

Winhelp Customization

You may include the stdlib help files into your used help files to be able to jump to the stdlib help topics from inside the ViLL or VLISP IDE on the hotkey <Ctrl-F1>.

This is done by adding a ":include stdlib-inc.cnt" statement on the end of your used help file container.

Also copy the STDLIB.HLP file and all other help files you may want to add (stdlibsrc.hlp, alispfaq.hlp, ...) to a directory in your help file search path, which is normally WINNT/HELP or the same directory of your main help file, as described below.

The used help files containers are version specific:

Vital Lisp Professional:

VILL/HELP/AL.CNT

Older VILL versions had no special AL.CNT file. They searched in the ACAD_CG.HLP so you should customize ACAD.CNT

Visual Lisp

VLISP/HELP/VLISP.CNT

AutoCAD 2000

AutoCAD 2000/HELP/acad_dev.cnt

Sorry, I don't know how to customize LISPPAD or LISPLINK, but that should be done in a similar way.

If no CNT file is provided, you may generate one from the .HLP file by the help decompiler HELPDECO, for example available at

ftp://xarch.tu-graz.ac.at/pub/autocad/adge/helpdeco.zip

The new HTMLHelp CHM format doesn't support CNT files.