Share

acrxLoadApp

C++

bool acrxLoadApp(
    const ACHAR * appname, 
    bool asCmd = false
);

File

rxregsvc.h

Description

This function is a C code wrapper for

acrxDynamicLinker->loadApp(appname, AcadApp::kOnLoadRequest, 0);

which loads the appName ObjectARX program. appName is the application name as set in the operating system registry. If the ObjectARX application does not have an entry in the registry, or if the registry entry has the AcadApp::kLoadDisabled load reason set, or if AcadApp::kOnLoadRequest does not match the AcadApp::LoadReasons value in the application's registry entry, then this function will be unable to load the application.

When asCmd is true, loading can happen only once. A second attempt to load will return false. The reference count for the application is not increased in this case. When asCmd is false, it's possible to call this method more than once and still get a successful return value. When the ARX file you want to load is already loaded, this method simply increments the reference count for the application.

The function returns 1 if the module was successfully found and loaded; otherwise, it returns 0.

Parameters

Parameters Description
appname Input file name or URL of ObjectARX program to load
asCmd Input Boolean indicating whether to load the application as if by user command

Was this information helpful?