2012

Table Of Contents
(defun C:OLDHATCH ( )
(command ".HATCH")
(princ)
)
(defun-q S::STARTUP ( )
(command "undefine" "hatch")
(princ "\nRedefined HATCH to BHATCH!\n")
)
Before the drawing is initialized, new definitions for HATCH and OLDHATCH
are defined with the defun function. After the drawing is initialized, the
S::STARTUP function is called and the standard definition of HATCH is
undefined.
NOTE To be appended, the S::STARTUP function must have been defined with
the defun-q function rather than defun.
Because an S::STARTUP function can be defined in many places (an acad.lsp,
acaddoc.lsp, or MNL file or any other AutoLISP file loaded from any of these),
it's possible to overwrite a previously defined S::STARTUP function.
The following example shows one method of ensuring that your startup
function works with other functions.
(defun-q MYSTARTUP ( )
... your startup function ...
)
(setq S::STARTUP (append S::STARTUP MYSTARTUP))
The previous code appends your startup function to that of an existing
S::STARTUP function and then redefines the S::STARTUP function to include
your startup code. This works properly regardless of the prior existence of an
S::STARTUP function.
ObjectARX
ObjectARX technology provides the foundation for design software applications
to share intelligent object data. You can run third-party ObjectARX application
programs or write your own.
ObjectARX | 85