Autoloader – Demand loading for LISP

By Stephen Preston

I think this is the last AutoCAD 2013 Autoloader enhancement to document now. Its more of an incremental enhancement than the others …

We strongly recommend that you set your plug-ins to load on demand (usually LoadOnCommandInvocation), rather than on startup. This is so a customer who has installed lots of plug-ins doesn’t see a huge slowdown in AutoCAD startup times. That wasn’t so easy for LISP apps – until now. Here’s an example of how you set a LISP module to load on command invocation:

    <!– LISP demand loading example –>  

    <ComponentEntry AppName="ADN_MINESWEEPER" ModuleName="./Contents/Windows/mylisp.lsp" LoadOnCommandInvocation="True">

      <Commands GroupName="ADN_MINESWEEPER">

        <Command Local="TEST" Global="TEST" Description="Simple LISP demand loading example" />

      </Commands>

    </ComponentEntry>

Which is exactly the same as you’d do it for ObjectARX or .NET. Smile

What further Autoloader enhancements would you be interested in? Post a  comment to let us know.


Comments

2 responses to “Autoloader – Demand loading for LISP”

  1. Make a version for older versions of AutoCAD!

  2. I would like to have the capability to define variables, and vary default values based on the running version and/or running vertical.
    Something like…
    [CustomVariables]
    –[Variable Name=”MyDrawingVariable” Storage=”Drawing” Type=”String” DefaultValue=”AutoCAD r%SERIES% Default”]
    —-[DefaultValueAlternate Platform=”AutoCAD MEP” SeriesMin=”19.0″ Value=”AutoCAD MEP 2013+ Default”/]
    –[/Variable]
    –[Variable Name=”MyProfileVariable” Storage=”Profile” Type=”Integer” Min=”0″ Max=”100″ DefaultValue=”50″]
    [/CustomVariables]

Leave a Reply to drgCancel reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading