My Plug-In isn't loaded by AppAutoLoader on Autocad Startup

My Plug-In isn't loaded by AppAutoLoader on Autocad Startup

serbestcihangir
Contributor Contributor
2,869 Views
9 Replies
Message 1 of 10

My Plug-In isn't loaded by AppAutoLoader on Autocad Startup

serbestcihangir
Contributor
Contributor

Hello Everyone,

I have plug-in and I bundled it according to explained process in help documentation.  But it isn't loaded by AppAutoLoader on Autocad startup. I tried all of suggested way in this forum. But I couldn't find any solution.  I am using AutoCAD 2021. My PackageContents.xml content is below. Please anyone can help me?

 

<?xml version="1.0" encoding="utf-8" ?>
<ApplicationPackage 
  SchemaVersion="1.0"
  AutodeskProduct="AutoCAD"
  ProductType="Application"
  AppVersion="1.0"
  Author="---------"
  Name="Grid Line Plug-In for AutoCAD"
  Description="Draws grid line with automatic labeling"
  Icon="./Contents/Resources/Grid_Line.ico"
  HelpFile="./Contents/Resources/SC_Grid_Line_for_AutoCAD_Help.htm"                    
  ProductCode="[C715545E-4761-4A03-90FA-51097B92616B]"
>
  <CompanyDetails 
    Name="-------------"
    Url="---------------"
    Email="-------------------" 
  />  
  <RuntimeRequirements OS="Win32|Win64" Platform="AutoCAD*|AutoCAD" SeriesMin="R15.0" SeriesMax="R24.0"/>  
  <Components>    
    <ComponentEntry AppName="Grid Line" ModuleName="./Contents/GridLine.dll" AppType="Dependency" LoadOnAutoCADStartup="True" LoadOnCommandInvocation="True" LoadOnRequest="True"/>
    <RuntimeRequirements OS="Win32|Win64" Platform="AutoCAD*|AutoCAD" SeriesMin="R15.0" SeriesMax="R24.0" SupportPath=".\Contents\"/>
    <Commands GroupName="ADSK_APPAMANAGER">
      <Command Local="GRIDLINE" Global="GRIDLINE" Description="Launches the Grid Line command."/>
      <Command Local="GL" Global="GL" Description="Launches the Grid Line command."/>
    </Commands>
  </Components>  
</ApplicationPackage>

 

0 Likes
Accepted solutions (1)
2,870 Views
9 Replies
Replies (9)
Message 2 of 10

_gile
Consultant
Consultant

Hi,

 

If you want your plugin to load at startup, remove the following attributes:

LoadOnCommandInvocation="True" LoadOnRequest="True"

And you do not need the <Commands ...> ...</Commands> part.

 

The Autoloader mechanism only work since AutoCAD 2012, so the SerieMin value should not be less than 18.2.

The <RuntimeRequirement .../> should not be part of the <Components> ... <Components/>.

 

Read the Autodesk Autoloader White Paper.

 

Try like this:

<?xml version="1.0" encoding="utf-8" ?>
<ApplicationPackage 
  SchemaVersion="1.0"
  AutodeskProduct="AutoCAD"
  ProductType="Application"
  AppVersion="1.0"
  Author="---------"
  Name="Grid Line Plug-In for AutoCAD"
  Description="Draws grid line with automatic labeling"
  Icon="./Contents/Resources/Grid_Line.ico"
  HelpFile="./Contents/Resources/SC_Grid_Line_for_AutoCAD_Help.htm"                    
  ProductCode="[C715545E-4761-4A03-90FA-51097B92616B]"
>
  <CompanyDetails 
    Name="-------------"
    Url="---------------"
    Email="-------------------" 
  />  
  <RuntimeRequirements OS="Win32|Win64" Platform="AutoCAD*" SeriesMin="R18.2" SeriesMax="R24.0" SupportPath=".\Contents\"/>  
  <Components>    
    <ComponentEntry AppName="Grid Line" ModuleName="./Contents/GridLine.dll" LoadOnAutoCADStartup="True"/>
  </Components>  
</ApplicationPackage>

 

 



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 3 of 10

serbestcihangir
Contributor
Contributor

Hi Dear Gilles ,

 

Kindly, thank you for your reply. 

I had inspected the article that you linked, before. And I have tried the xml code that you suggested. But, unfortunately it didn't solve my problem.  My plug-in isn't still uploaded on AuoCAD startup.

 

0 Likes
Message 4 of 10

_gile
Consultant
Consultant

Does your plugin works as expected if you netload it from the .bundle folder?

If so, what's the value of the APPAUTOLOAD system variable?



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 5 of 10

serbestcihangir
Contributor
Contributor

Yes. I have loaded it via NETLOAD from .bundle folder. And, it worked as expected. 

 

APPAUTOLOAD System Variable is 14.  I have tried with 2 but it didn't change anything. 

0 Likes
Message 6 of 10

_gile
Consultant
Consultant
Accepted solution

I made a try with the upper XML example and all worked as expected.

I build a simple GridLine.bundle folder which contains the PackageContents.xml file with the upper code and a Contents folder which only contains a GridLine.dll file (this app only shows an alert dialog box displaying "GridLine loaded" at initialization).

 

Attached a ZIP file containing the GridLine.bundle folder.

Don't forget to Unblock the ZIP before extracting all in an ApplicationPlugins folder (I did my test in %appdata%\Autodesk\ApplicationPlugins).

You can replace the GridLine.dll by yours.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 7 of 10

serbestcihangir
Contributor
Contributor

Dear Gilles,

 

Thank you so much for your help.

 

Your example worked very well. I replaced my .dll with your  example. Now, my plug-in is running. 

I think, there was a problem in my .bundle structure. 

 

Many thanks again.

 

0 Likes
Message 8 of 10

Anonymous
Not applicable

Hi,

 

I have the same problem.

I do not realy understand what i can do with the zip file.

 

But you say there was somthing wrong in your folder? 

Can you explain how you fixed it? 

0 Likes
Message 9 of 10

serbestcihangir
Contributor
Contributor

Hi,

 

As far as I remembered; the problem of my plug-in was wrong folder name. After reviewing carefully , I realized, the folder name that I declared in PackageContents file and the real folder name was not match.  When I corrected it, plug-in was loaded successfully. 

 

But you are mentioning about zip file. Be aware of that all of files in bundle should be original.  AutoCAD can't read any zip file.

0 Likes
Message 10 of 10

Anonymous
Not applicable
Hi,

Oh this is not the problem for me.
Than I have to keep searching 😄
0 Likes