PyAcad 0.4.1

External Application Management

The functions and constants in this section are defined directly in the ads module.

Functions

arxload(appname)
Attempt to load the ARX application with the name <appname> from the file <appname>.arx on the Autocad support files search path.
Not available for Intellicad 2000.
arxunload(appname)
Attempt to unload the ARX application with the name <appname>.
Not available for Intellicad 2000.
arxloaded() -> (appname...)
Return a list of strings with the names of the currently loaded ARX applications, or None if there aren't any.
Not available for Intellicad 2000.
xload(appname)
Attempt to load the ADS application with the name <appname> from the file <appname>.ads on the Autocad/Intellicad support files search path.
Not available for Autocad 2000 and later.
xunload(appname)
Attempt to unload the ADS application with the name <appname>.
Not available for Autocad 2000 and later.
loaded() -> (appname...)
Return a list of strings with the names of the currently loaded ADS applications, or None if there aren't any.
Not available for Autocad 2000 and later.
invoke(function_name [, arg...]) -> result

Invoke an external function defined in another ADS/ARX application. The first argument is the name of the external function. If the function was defined as an AutoCAD command, the string must include the C: prefix. The remaining arguments must match the external function's argument list in their order, types, and value ranges.

If invoke() succeeds, it returns the values as returned from the invoked function to the ADS/ARX environment, possibly None.

A ValueError exception indicates that the external function is not currently loaded, that it (or a function that it calls) is defined in the same application but hasn't been registered using ads_regfunc(), or that the argument list contains invalid items.