Bangalore, India
In one of my last posts, I wrote about the AppStore in AutoCAD 2012. Along with the AppStore, the AutoLoader is another nice little tool in AutoCAD 2012 that will ease the burden of third-party developers to create and install their plugins into AutoCAD, and include all the modern user-interface controls that AutoCAD 2012 offers.
To go through the motions of the AutoLoader, I created a stand-alone FREEWARE application called PLARC2PL which is one of the more popular polyline tools within GeoTools. It helps convert arcs and polyline arcs into linear segments. The PLARC2PL application is available in English, Spanish and German and one of the first AppStore applications to be so.
Today, I submitted my app PLARC2PL to Autodesk for review and approval. That is the normal process flow. Anyone can submit an application for inclusion in the AppStore. You don't have to be an ADN menmber or any other kind of Autodesk partner. All you need is an application that Autodesk will consider worthy of inclusion in its AppStore. Stay tuned on this channel. We will let you know when it is up there and accessible from the Autodesk AppStore for free download in AutoCAD 2012.
All apps in the AppStore use the AutoLoader and that is what makes it load automatically when AutoCAD 2012 starts. Your apps must be packaged as a bundle of files that resides in a pre-defined folder location and whose structure and contents are defined by a central XML file. The XML file lists all the constituent files, their types and their locations. It also defines the operating system type (32 or 64 bits) and how the loading and execution must be handled in them. Let us examine a structure of the XML file used by the AppLoader. What you see below is the XML file of the PLARC2PL applicaton of ours that is now available in the AppStore.
<?xml version="1.0" encoding="utf-8"?>
<ApplicationPackage SchemaVersion="1.0" ProductType="Application" Name="PlArc2Pl" AppVersion="1.0.0" Description="Four Dimension Technologies Plugin: PlArc2Pl" Author="Rakesh Rao" Icon="./Contents/Resources/PlArc2Pl_16.bmp" OnlineDocumentation="http://www.4d-technologies.com/geotools/manual/conversion_tools.htm#PLARC2PL" HelpFile="./Contents/Resources/plarc2pl.htm" ProductCode="{2F5A8540-764A-48E9-BFD0-FEEACA07CF55}" UpgradeCode="{7DB0637F-F53F-4E72-90B8-1DCEEAAE56BD}">
<CompanyDetails Name="Four Dimension Technologies" Phone="+91-80-41147616;+91-9243438300 " Url="http://www.4d-technologies.com" Email="rakesh.rao@4d-technologies.com"/>
<Components>
<RuntimeRequirements SupportPath="./Contents/Resources" OS="Win32" SeriesMin="R18" />
<ComponentEntry AppName="FDTPlugin-PlArc2Pl" ModuleName="./Contents/Windows/PlArc2Pl.vlx" AppDescription="Four Dimension Technologies Plugin: PlArc2Pl" LoadOnAutoCADStartup="True">
<Commands GroupName="FDTPLUGINS">
<Command Local="PLARC2PL" Global="PLARC2PL" />
</Commands>
</ComponentEntry>
<ComponentEntry AppName="doslib8-32bit" ModuleName="./Contents/Windows/doslib2k10_gt.arx" LoadOnAutoCADStartup="True" />
<ComponentEntry ModuleName="./Contents/Resources/PlArc2Pl.cuix" />
</Components>
<Components>
<RuntimeRequirements SupportPath="./Contents/Resources" OS="Win64" SeriesMin="R18" />
<ComponentEntry AppName="FDTPlugin-PlArc2Pl" ModuleName="./Contents/Windows/PlArc2Pl.vlx" AppDescription="Four Dimension Technologies Plugin: PlArc2Pl" LoadOnAutoCADStartup="True">
<Commands GroupName="FDTPLUGINS">
<Command Local="PLARC2PL" Global="PLARC2PL" />
</Commands>
</ComponentEntry>
<ComponentEntry AppName="doslib8-64bit" ModuleName="./Contents/Windows/doslib2k10_gt_64.arx" LoadOnAutoCADStartup="True" />
<ComponentEntry ModuleName="./Contents/Resources/PlArc2Pl.cuix" />
</Components>
</ApplicationPackage>
If you know a little bit about XML files, it is easy to understand the structure of the above file. The XML file is packaged with ApplicationPackage as the outermost node and Components as the two inner nodes. Each Components node provides independent information about running the application in 32-bit and 64-bit operating systems. If your application works without change and uses the same files in both 32 and 64 bit OS'es, you can have only one Components node and specify the key as "OS=Win".
The ComponentEntry node defines how each component of your application should look. The ModuleName specifies the relative path to the location of the component (like an ARX, VLX or CUIX file). The AppName specifies the name of the component. The LoadOnAutoCADStartup entry takes True or False as values and specifies whether the component should be automatically loaded upon AutoCAD startup or not. There is also a Commands section which registers the commands defined by the application. The sequence of loading of the Components is bottom-to-top. The last ComponentEntry item in the XML loads first i.e in the reverse order in which it is specified in the XML file.
Once you have defined your complete application data via this XML file, all you need to put it into the folder shown below and the rest of the installation is automatic:
Drive:\Users\<user name>\AppData\Roaming\Autodesk\ApplicationPlugins\<your_plugin_name>...
For example, on my computer, my plugin folder looks like this:
C:\Users\Rakesh Rao\AppData\Roaming\Autodesk\ApplicationPlugins\FDTPlugin-PLARC2PL.bundle
If you want to know more about AutoLoader, AppStore etc directly from an Autodesk source, I would suggest reading Kean Walmsley's Through the Interface blog. Currently, he is writing a series of topics covering the AppStore, how to submit applictaions and more.
Discover Bricscad, discover GeoTools-AutoCAD & GeoTools-Bricscad, discover TechCenter . Brand new ways to work smarter in CAD!!