Loading plugin without using NETLOAD

Loading plugin without using NETLOAD

Anonymous
Not applicable
1,336 Views
1 Reply
Message 1 of 2

Loading plugin without using NETLOAD

Anonymous
Not applicable

HI,

I've been trying for weeks to get a plugin to load by placing it in a .bundle folder with the corresponding PackageContents.xml. The dll loads just fine when I use NETLOAD. I'm planning to write an executable that will launch AutoCAD to change drawings by using use my dll. Is there a way to use NETLOAD in an executable to load the dll?  Thank you!

0 Likes
1,337 Views
1 Reply
Reply (1)
Message 2 of 2

_gile
Consultant
Consultant

Hi,

 

If you start AutoCAD from a standalone executable using the COM API, you can call NETLOAD in an AutoLISP expression (this avoid the dialog box to open) launchned with the AcadDocument.SendCommand() method (you can see an example here).

But the Autoloader route should also work, I extensively use it.

Here's a minimalist PackageContents.xml file example. Replace "YourApp" with your application name, the DLL is supposed to be in a 'Contents' directory.

<?xml version="1.0" encoding="utf-8"?>
<ApplicationPackage
  SchemaVersion="1.0"
  AppVersion="1.0.0"
  ProductCode="{83F90232-3CEB-40F0-45BE-2638C919CEA5}"
  UpgradeCode="{B31D4C65-464B-4665-9E9F-B3877B1C453A}"
  Name="YourApp"
  AutodeskProduct="AutoCAD"
  ProductType="Application">
  <Components Description="2013 to 2019 parts">
    <RuntimeRequirements OS="Win32|Win64" Platform="AutoCAD*" SeriesMin="R19.0" SeriesMax="R23.0" />
    <ComponentEntry
      AppName="YourApp"
      Version="1.0.0"
      ModuleName="./Contents/YourApp.dll"
      LoadOnAutoCADStartup="True">
    </ComponentEntry>
  </Components>
</ApplicationPackage>


Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes