Autoloader not working

Autoloader not working

Anonymous
Not applicable
2,039 Views
5 Replies
Message 1 of 6

Autoloader not working

Anonymous
Not applicable

I followed the example structure here to autoload a lsp file, but when calling the command I get unknown command error. I thought I probably had some user error, so tried this example by @Alexander.Rivilis. Just copied the zip file to "C:\ProgramData\Autodesk\ApplicationPlugins" and extracted to "PartsList.bundle". Again I get the error Unknown command "PARTSLIST". Press F1 for help. Is there something more I need to do other than extracting that zip file in the appropriate location?

My end goal is to autoload a compiled lsp file. If I can atleast get a working example on my machine then I can proceed from there. For now, after failing to run a working example (working for other users), I absolutely have no clue how to proceed. I will really appreciate any suggestions/comments.

0 Likes
Accepted solutions (2)
2,040 Views
5 Replies
Replies (5)
Message 2 of 6

_gile
Consultant
Consultant
Accepted solution

Hi,

 

You should show you PackageContents.xml code and the .bundle folder structure.

 

This is an example of a minimalist PackageContents.xml to autoload a .NET dll (it could be .lsp or .fas or.vlx file as well).

folder structure:

Trapeze.bundle
    PackageContents.xml
    Contents
        Trapezoid.dll

PackageContents.xml

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

 

PS: if you download a ZIP file from internet, you should unblock the ZIP file before extracting files.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 3 of 6

Alexander.Rivilis
Mentor
Mentor
Accepted solution

@Anonymous 

What version of AutoCAD did you use to check? Refered bundle was designed for AutoCAD 2013 and 2014. You can check it with AutoCAD 2019 or 2020 if replace in PackageContents.xml string "R19.1" with "R23.1"

Also you have to unblock zip-file with bundle: https://winaero.com/blog/how-to-unblock-files-downloaded-from-internet-in-windows-10/

 

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 4 of 6

Anonymous
Not applicable

Great! I look at your code and compared with the Partlist code and realized the series max was set at 19 vs yours 23. I changed that to 22.0 in my code and it is working great for now. Thanks.

p.s. Next task is to see if I can somehow create an installer. Would you know of any good links that would help with that?

0 Likes
Message 5 of 6

Anonymous
Not applicable

I finished replying to @_gile  and saw your reply. You got it right!! Thanks to both of you.

0 Likes
Message 6 of 6

Anonymous
Not applicable

Can you shed some light on the Product code and the Upgrade code. I was reading this white paper but could not understand clearly. And I see that you used it in your above code so thought I'd ask.

0 Likes