Automatically Load ObjectARX Applications (Concept)

AutoCAD

 
Automatically Load ObjectARX Applications
Concept Quick Reference
 
 
 

Some ObjectARX samples contain an acad.rx file, which lists ObjectARX program files that are loaded automatically when you start AutoCAD.

You can create or edit this file with a text editor or word processor that produces files in ASCII text format, adding to or deleting from its contents to make the appropriate ObjectARX programs available for use. As an alternative, the APPLOAD command provides a Startup Suite option that loads the specified applications without the need to edit any files.

Because AutoCAD searches for the acad.rx file in the order specified by the library path, you can have a different acad.rx file in each drawing directory. This makes specific ObjectARX programs available for certain types of drawings. For example, you might keep 3D drawings in a directory called AcadJobs/3d_dwgs. If that directory is set up as the current directory, you could copy the acad.rx file into that directory and modify it in the following manner:

myapp1
otherapp

If you place this new acad.rx file in the AcadJobs/3d_dwgs directory and you start AutoCAD with that as the current directory, these new ObjectARX programs are then loaded and are available from the AutoCAD command prompt. Because the original acad.rx file is still in the directory with the AutoCAD program files, the default acad.rx file will be loaded if you start AutoCAD from another directory that does not contain an acad.rx file.

You can load ObjectARX programs from an MNL file using the arxload function. This ensures that an ObjectARX program, required for proper operation of a menu, will be loaded when the menu file is loaded.

You can also autoload many ObjectARX-defined AutoCAD commands. See Overview of AutoLISP Automatic Loading and autoarxload in the AutoLISP Reference in the Help system. To display Developer Help, click Help menu Additional Resources Developer Help.