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

AutoCAD 2015 Autoloader Changes?

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
Rob.O
5269 Views, 10 Replies

AutoCAD 2015 Autoloader Changes?

So for those of you that have had the opportunity to download AutoCAD 2015 from your subscription site, I am wondering if you have had any issues with the Autoloader?

 

I have a few .bundle folders that load just fine in AutoCAD 2012 and AutoCAD 2014, but they don't load correctly in 2015.  All of my .CUIx menus autoload into 2015 with no issue, but the commands from my code are not recognized after startup.

 

The first troubleshooting step I tried was to manually NETLOAD the dll files.  The .dll files loaded successfully and the code worked with no issues (at least the few routines I tried).  I then thought that maybe it just wasn't autoloading the .dll due to a variance in the .NET framework.  So, I created a brand new project from scratch in VS 2013 Express, referenced the AutoCAD 2015 .dlls and compiled the code using the 4.5 framework.  The code NETLOADs and runs fine in 2015.

 

I then created a new .bundle folder and PackageContents.xml file.  There appear to be no errors in the .xml as it opens fine in a browser and is identical to all of the others I have that work in 2012/2014.  I even copied an old one and tested it with no success.

 

When starting AutoCAD 2015 the balloon notification will sometimes pop-up saying my utility has been loaded and sometimes it does not.  I have never experienced this in previous releases.  The balloon notification pops up 100% of the time when starting AutoCAD 2014 or 2012.

 

In any case, even when the balloon notification states that my utility has been loaded, when typing the command name, it comes up as an unknown command.

 

As a final test, I changed nothing and started up AutoCAD 2014.  The balloon notification showed stating that my utility has been loaded (as expected) and the command was recognized and actually ran (unexpectedly).

 

So... it appears the Autoloader is failing to load the .dll files properly in AutoCAD 2015.  Either that or 2015 requires something I am missing (in the XML?).  Although, I looked through the 2015 documentation and saw no changes to the required attributes in the PackageContents.xml for 2015.

 

Any ideas?

 

 

TIA!

 

 

 

 

 

10 REPLIES 10
Message 2 of 11
Keith.Brown
in reply to: Rob.O

Unfortunately anyone that might know because they were in the BETA of the software are bound by the NDA until the official announcement on March 27, 2014 at 9am eastern.  Until that time you might not get any answers so please be patient.

Message 3 of 11
Rob
Contributor
in reply to: Keith.Brown

Now that AutoCAD 2015 has been released, I am bumping this in the hopes that someone knows what the issue might be!

Message 4 of 11
Rob.O
in reply to: Rob

Ooops... signed in with the wrong account when I posted that last message. 🙂

 

Message 5 of 11
Rob.O
in reply to: Rob.O

So it appears I may have solved the mystery...

 

By adding the LoadOnAutoCADStartup="True" attribute to the PackageContents.xml file, the .dll loads properly in AutoCAD 2015. 

 

2015 Help file says:

 

"ComponentEntry element – Required, if Components element present - AutoCAD 2013 and later"

http://help.autodesk.com/view/ACD/2015/ENU/?guid=GUID-BC76355D-682B-46ED-B9B7-66C95EEF2BD0

 

So, I added it and what do ya know!

 

I have never used this attribute in any of my PackageContents.xml files for AutoCAD 2014 and never had an issue.  And I do have the ComponentEntry element present in all of them.  In fact, if you remove the attribute altogether from the .xml file, .dll files will stil load in AutoCAD 2014 with no issues.  But, remove it and they will not load in AutoCAD 2015.

 

Whew! Smiley Very Happy

 

 

Message 6 of 11
Rob.O
in reply to: Rob.O

Ah... the mystery deepens...

 

From the help file:

 

LoadOnAutoCADStartup.Load when the AutoCAD-based product starts up. When specified, this parameter has precedence over all other parameters. It is recommended only to useLoadOnAutoCADStartupwhen none of the other parameters are suitable, disable it (set it to False) whenever possible. If theLoadOnAutoCADStartupparameter is omitted, then it defaults to enabled (set to True) unlessLoadOnCommandInvocationis enabled, in which caseLoadOnAutoCADStartupdefaults to False. Only applies to ObjectARX and .NET modules.

 

http://help.autodesk.com/view/ACD/2015/ENU/?guid=GUID-3C25E517-8660-4BB7-9447-2310462EF06F

 

I am not using LoadOnCommandInvocation, so why now does it no longer default to True when omitted?  I guess I have to refer back to my original question... did something change?  I feel like I am talking to myself here! Smiley Tongue

 

TIA!

Message 7 of 11
StephenPreston
in reply to: Rob.O

Hi Rob,

 

You're not just talking to yourself :-).

 

We have made some enhancements (and bugfixes) to Autoloader, but I don't expect the basic behavior to have changed. That said, its possible you'd made some assumptions about what demand load settings you could omit and what behavior that would default to that just happened to work pre-2015. If you send me your old PackageContents.xml, then I may be able to better advise why it broke in 2015.

Cheers,

Stephen Preston
Autodesk Developer Network
Message 8 of 11
Rob.O
in reply to: Rob.O

Hi Stephen!

 

Thanks for the reply!

 

I just sent you an e-mail contining the .bundle I am using. 

 

I am sure it's just a matter of me not fully understanding the variables that go into the PackageContents.xml file!

 

 

Message 9 of 11
StephenPreston
in reply to: Rob.O

Hi Rob,

 

I talked to the engineer responsible for Autoloader, and he has asked me to log this issue as a bug. Autoloader should default to LoadOnAutoCADStartup if no explicit demandload settings are specified. The workaround (which you've already found) is to explicitly add LoadOnAutoCADStartup="True" to the <ComponentEntry/> element. Of course, wherever possible, you should use LoadOnCommandInvocation to avoid slowing down AutoCAD startup.

 

 

Cheers,

Stephen Preston
Autodesk Developer Network
Message 10 of 11
Rob.O
in reply to: StephenPreston

Thanks Stephen!

 

I greatly appreciate you taking the time to look into this!

 

 

 

 

 

 

Message 11 of 11
pfk
Enthusiast
in reply to: Rob.O

Hi - I have the same problem.  I have compiled my plugin with VS2012 and the AutoCAD2015 API and put the dll in the relevant bundle folder which autoloads fine in 2013 and 2014.  In 2015 the cuix is listed in the User Interface panel (under "Partial Customization Files", but the icon to run the command is missing from the Addins tab.  I changed the xml file to add LoadOnAutoCADStartup="True", and then I can run the command via the command line (so the addin is loading - just not appearing on the Addins tab).  Adding LoadOnAutoCADStartup="True" to the CUI component did not result in the cuix icon being added to the Addins tab.

 

Thanks

 

Paul

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost