.NET

Reply
Valued Mentor
Rob.O
Posts: 261
Registered: ‎06-25-2007
Message 1 of 11 (2,003 Views)
Accepted Solution

AutoCAD 2015 Autoloader Changes?

2003 Views, 10 Replies
03-25-2014 01:48 PM

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!

 

 

 

 

 

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! :smileyvery-happy:

 

 

*Expert Elite*
Keith.Brown
Posts: 1,237
Registered: ‎03-13-2008
Message 2 of 11 (1,995 Views)

Re: AutoCAD 2015 Autoloader Changes?

03-25-2014 01:56 PM 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.


Keith Brown AutoCAD MEP BLOG | RSS Feed
AutoCAD MEP 2014 | Revit 2014 | EastCoast CAD/CAM V6.1 | Visual Studio 2013
────────────────────────────────────
⁞|⁞ Please use Mark Solutions!.Accept as Solution and Give Kudos!Give Kudos as appropriate. Thank you!
Contributor Rob
Contributor
Rob
Posts: 22
Registered: ‎11-01-2010
Message 3 of 11 (1,851 Views)

Re: AutoCAD 2015 Autoloader Changes?

03-28-2014 08:03 AM 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!

Valued Mentor
Rob.O
Posts: 261
Registered: ‎06-25-2007
Message 4 of 11 (1,848 Views)

Re: AutoCAD 2015 Autoloader Changes?

03-28-2014 08:05 AM in reply to: Rob

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

 

Valued Mentor
Rob.O
Posts: 261
Registered: ‎06-25-2007
Message 5 of 11 (1,814 Views)

Re: AutoCAD 2015 Autoloader Changes?

03-28-2014 01:20 PM 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! :smileyvery-happy:

 

 

Valued Mentor
Rob.O
Posts: 261
Registered: ‎06-25-2007
Message 6 of 11 (1,808 Views)

Re: AutoCAD 2015 Autoloader Changes?

03-28-2014 01:31 PM 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! :smileytongue:

 

TIA!

ADN Support Specialist
StephenPreston
Posts: 429
Registered: ‎05-22-2006
Message 7 of 11 (1,738 Views)

Re: AutoCAD 2015 Autoloader Changes?

03-31-2014 03:56 AM 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
Valued Mentor
Rob.O
Posts: 261
Registered: ‎06-25-2007
Message 8 of 11 (1,720 Views)

Re: AutoCAD 2015 Autoloader Changes?

03-31-2014 08:05 AM 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!

 

 

ADN Support Specialist
StephenPreston
Posts: 429
Registered: ‎05-22-2006
Message 9 of 11 (1,656 Views)

Re: AutoCAD 2015 Autoloader Changes?

04-02-2014 06:03 AM 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
Valued Mentor
Rob.O
Posts: 261
Registered: ‎06-25-2007
Message 10 of 11 (1,648 Views)

Re: AutoCAD 2015 Autoloader Changes?

04-02-2014 07:21 AM in reply to: StephenPreston

Thanks Stephen!

 

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

 

 

 

 

 

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.