.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

.bundle publisher?

8 REPLIES 8
Reply
Message 1 of 9
kstate92
2288 Views, 8 Replies

.bundle publisher?

This is going to come across as lazy, but is there really nothing available that can create a proper .bundle package?  Given the plethora of info required in the PackageContents.xml PackageContents alone, I'm surprised nothing seems to exist that would help with the heavy lifting (such as a GUI), instead of copying an existing bundle and stumbling your way through it (in my case no doubt several times), hoping you have everything changed correctly.  A few examples are nice and I have a Autodesk White Paper on the topic, but more likely than not, your (my) specific project is going to be different enough from the handful of 'go-bys' to leave you hacking in the original definition (i.e, blindly).

 

All of this because of the ~20% chance of a simple dll not loading at startup, in the finest AutoCAD tradition.  Funny how computers are anything but binary at times.

KState92
Inventor Professional 2020
AutoCAD Mechanical 2022.0.1
Windows 10 Pro 64 bit - 1903
Core i7-8700 32 GB Ram
Quadro P2000
8 REPLIES 8
Message 2 of 9
philippe.leefsma
in reply to: kstate92

There is no GUI or related tools to create a .bundle at the moment, sorry for the bad news.

 

This seems like a nice and useful idea however ...

 

Regards,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 3 of 9
kstate92
in reply to: philippe.leefsma

Blind, brute-force attempts it is, then.

 

By the way, within AutoCAD 2014, running AppAutoLoader and picking the Reload option results in a file being created in the root of my .bundle folder (that doesn't work), named APPAUTOLOADER.LOG (attached).

 

NOWHERE in any 'help' that I can find, does it explain what this file is trying to tell me, nor even that the Reload option would even generate said file!  To call this commands' documentation incomplete is a bit generous.

 

What I really don't understand is this file lists all these entries as blank, but of the ones listed as required in the documentation, I've at least tried to fill in the blanks from the other present bundles and the help files, but...?  This log file is also totally generic with no specific references at all, so maybe even it isn't working correctly.  Then again: HOW WOULD I KNOW?

KState92
Inventor Professional 2020
AutoCAD Mechanical 2022.0.1
Windows 10 Pro 64 bit - 1903
Core i7-8700 32 GB Ram
Quadro P2000
Message 4 of 9
StephenPreston
in reply to: kstate92

Hi kstate92,

 

The fact that this log file is created tells us that you have a bug in your XML. The fact that all the listed parameters are empty implies that Autoloader wasn't even able to read the XML - which points to a malformed XML. If you open the XML file in a browser (e.g. Internet Explorer), does it report an error in the XML or does it display the XML file in its entirety.

 

You're welcome to upload your PackageContents.xml file here, and I or someone from my team will take a look at it for you. Or you can send it to me privately if you prefer others not to see any information about the app you're writing.

 

 

Cheers,

Stephen Preston
Autodesk Developer Network
Message 5 of 9
kstate92
in reply to: StephenPreston

Ah, I did have an error in my xml (shocking). Fixed, loads as valid in IE.  Restart AutoCAD, issue the dll command (OO): not recognized.  Issue the APPAUTOLOADER command and:

 

Enter an autoloader action [List/Reload] <List>:

5 application bundles loaded. C:\Program Files\Autodesk\ApplicationPlugins\SBD4.bundle C:\Program Files\Autodesk\ApplicationPlugins\Vault.bundle C:\ProgramData\Autodesk\ApplicationPlugins\Autodesk AppManager.bundle C:\ProgramData\Autodesk\ApplicationPlugins\Autodesk FeaturedApps.bundle C:\ProgramData\Autodesk\ApplicationPlugins\Autodesk ImportSkp.bundle Command: OO Unknown command "OO".  Press F1 for help.

Command: APPAUTOLOADER

Enter an autoloader action [List/Reload] <List>: R

C:\ProgramData\Autodesk\ApplicationPlugins\Autodesk FeaturedApps.bundle\Contents\Windows\2014\FeaturedAppsPlugin.dll...loaded.

C:\ProgramData\Autodesk\ApplicationPlugins\OpenArchive2014.bundle\Contents\OpenArchive2014.dll...loaded.

 

Issue the OO command, the dll works.  But not without a manual reload.

 

PackageContents.xml file attached.

KState92
Inventor Professional 2020
AutoCAD Mechanical 2022.0.1
Windows 10 Pro 64 bit - 1903
Core i7-8700 32 GB Ram
Quadro P2000
Message 6 of 9
StephenPreston
in reply to: kstate92

I tested your XML by setting ModuleName to point to my own test DLL. It worked fine - no manual reload is required. So that could mean your DLL depends on another DLL that Autoloader doesn't know about, or your ModuleName path is not correct. (But I'm not sure in that case why Autoloader is reporting success loading your DLL).

 

BTW Some additional comments:

 

1. RuntimeRequirements should really go inside the Components section. The 'global' RuntimeRequirements is going to be deprecated soon. And RuntimeRequirements is required inside Components, regardless of the presence of the global one.

2. Best practice is to use LoadOnCommandInvocation="True" and not LoadOnAutoCADStartup="True" - to ensure you don't hammer the AutoCAD startup time if you have lots of bundles installed.

3. Remember to put a proper GUID in your placeholder in due course :-).

 

 

 

Cheers,

Stephen Preston
Autodesk Developer Network
Message 7 of 9
kstate92
in reply to: StephenPreston

I've revised and attached per your 1. and 2. suggestions.  Is 3. obtained from within Visual Studio > Project > Properties > Assembly Information > GUID?  If so, just a brief explanation of that somewhere would go a long way for us non-CS majors.  What I'm not sure about is if this GUID changes if the source code changes, requiring a manual cut and paste to keep things in sync.

 

On program startup, I'm now getting something a bit different on the command line: "Autoloader for OpenArchive2014 has no commands".  If I manually load (irony) the dll via netload, it works fine.

KState92
Inventor Professional 2020
AutoCAD Mechanical 2022.0.1
Windows 10 Pro 64 bit - 1903
Core i7-8700 32 GB Ram
Quadro P2000
Message 8 of 9
StephenPreston
in reply to: kstate92

If you're willing to send me a test project, then I can look at it for you properly. Autodesk email addresses are firstname.lastname@autodesk.com, so I'm sure you can work mine out :-). I don't think I can help you more without that, because its working fine for me with my own test DLL.

 

The GUID is just an identifier that is unique to that bundle. You can get it from anywhere you like or generate a new one - as long as it is unique for that bundle. It doesn't even have to be a GUID. AutoCAD is using this to record in the registry that it has already processed your app - look in the registry and you'll see it.

 

BTW If you changed to LoadOnCommandInvocation, did you remember to add the <Commands/> section to your <ComponentEntry/>? You need to tell AutoCAD which commands it loads your DLL for.

 

 

Cheers,

Stephen Preston
Autodesk Developer Network
Message 9 of 9
kstate92
in reply to: StephenPreston

Just to close this topic for anyone that stumbles upon it, with Stephens' invaluable help, I simplified my PackageContents.xml quite a bit (attached).

 

The final key was undoing my own damage of changing APPAUTOLOAD to 12, which actually prevented the bundle from loading on startup.  Setting it back to the default of 14 cured my ills. 

KState92
Inventor Professional 2020
AutoCAD Mechanical 2022.0.1
Windows 10 Pro 64 bit - 1903
Core i7-8700 32 GB Ram
Quadro P2000

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Autodesk Design & Make Report