.NET

Reply
Contributor
mhama
Posts: 11
Registered: ‎01-10-2008
Message 1 of 18 (534 Views)
Accepted Solution

AutoCad 2015: autoLoader loading dll but commands not working

534 Views, 17 Replies
05-14-2014 11:11 AM

This is my first tinker with the autoloader since it came out. I have just upgraded to AutoCAD Map 2015 from 2012. As it is my first time I read the white paper "AutoCAD Plugin AutoLoader" and other posts out there to understand what is going on. After a couple of tries I finally had my vb.net loaded, but I can not seem to get my commands recognised. I have upgraded the programs with VS express 2013and put in the new accoremgd reference and everything is working as long as I netload the .dlls. I have checked http://forums.autodesk.com/t5/NET/AutoCAD-2015-Autoloader-Changes/td-p/4910140

and http://forums.autodesk.com/t5/NET/AutoCad-2015-autoLoader-not-loading-dll/td-p/4943902 and still not nothing.As i am not very well versed with XML, I am maybe making some error that i can not find,  I have attached my packagecontents file.

@mhama

 

I took the original PackageContents.xml you sent and notice that the AppDescription is missing at the ComponentEntry, also, include LoadOnCommandInvocation="True" LoadOnRequest="True"

 

Finally, the ProductCode is only required for apps on the store, so we can control updates.

The thread was going in a different direction and was not answering my question. Thanks for the update. I finally got it to work after fiddling with the packagecontents.xml. I wish they had something to produce the package file, this way people not well versed with XML can use that and make sure they have all the requirements right.

 

Thanks again

 

 

Contributor
dimitri
Posts: 22
Registered: ‎07-12-2012
Message 2 of 18 (513 Views)

Re: AutoCad 2015: autoLoader loading dll but commands not working

05-14-2014 04:44 PM in reply to: mhama

I have the same problem here, NETLOAD is apparently loading my DLL when initializing AutoCAD Mechanical 2015 but I cannot get tha ribbons and commands available. It was fine until version 2014.

Please I do not understand anything of XML, I just want to keep loading my .NET or DLL file by using NETLOAD command as always. Thanks

Distinguished Contributor
mcicognani
Posts: 125
Registered: ‎12-01-2004
Message 3 of 18 (499 Views)

Re: AutoCad 2015: autoLoader loading dll but commands not working

05-15-2014 12:00 AM in reply to: mhama

I've checked the .xml and it seems correct. You may need additional parameters before uploading the bundle on the Exchange Store, but I don't think it would make a difference now.

It strikes me however, that you have a single DLL for all that versions of AutoCAD, shouldn't you need to recompile it when AutoCAD breaks binary compatibility? (I not versed in VB, just C#, so I may be wrong here)

 

My suggestion is to start adding secondary parameters that right now seems irrelevant, but that may interfeer with the correct loading, like SupportedLocales="Enu", AppNameSpace and/or UpgradeCode. At the beginning I remember some parameters were marked as optional, but I needed to add them anyway to make it work. I haven't checked the Autodesk guide recently, I just continued to modify the first xml that worked ;-)

 

I attach a xml that work for sure, it still misses the 2015 section, but you can guess it from the other sections.

Contributor
mhama
Posts: 11
Registered: ‎01-10-2008
Message 4 of 18 (475 Views)

Re: AutoCad 2015: autoLoader loading dll but commands not working

05-15-2014 07:17 AM in reply to: mcicognani

Thanks for the reply, appreciate it. I was trying to go as vanilla as possible just to start so that if something did not work i could easily diagnose. I put all the details in and still the commands are not being recognized. I use APPAUTOLOADER to list the apps loaded and my app is definitely loaded. so still not sure what I am doing wrong. Is there code that i can use to test which parts on my modules are loaded? or see which part is not being loaded?

Contributor
dimitri
Posts: 22
Registered: ‎07-12-2012
Message 5 of 18 (470 Views)

Re: AutoCad 2015: autoLoader loading dll but commands not working

05-15-2014 07:30 AM in reply to: mhama

ok, I built my own XML and made it run on ACADM2014, it was ok. When I try ACADM2015 it really does not work. It runs the XML but also does not recognize the commands available in the DLL.

Distinguished Contributor
mcicognani
Posts: 125
Registered: ‎12-01-2004
Message 6 of 18 (469 Views)

Re: AutoCad 2015: autoLoader loading dll but commands not working

05-15-2014 07:36 AM in reply to: mhama

Why don't you debug your DLLs using Visual Studio? You can place a break point in the initialization code of your classes and see what happen...

Anyway, in my experience, if something goes wrong the DLL would be stopped dead, no part would be working. Still, in that state, it cannot be unloaded or reloaded if not restarting AutoCAD (as every other DLL, working or not).

 

However, you say your command are not launched, but: are listed in the command prompt while you digit the command or it simply say that are non recognized?

If you see the command while you digit, you may be sure that the declaration inside your plugin is correct (and the dll is running), if not you have two chances:

- during initialization of the dll something goes wrong and it stops (debug debug debug)

- maybe you dropped some declaration in your code. Have you tried a vanilla plugin with all the declaration in place crated by the wizard?

Contributor
mhama
Posts: 11
Registered: ‎01-10-2008
Message 7 of 18 (466 Views)

Re: AutoCad 2015: autoLoader loading dll but commands not working

05-15-2014 07:43 AM in reply to: mcicognani

I was just debugged  and it works perfectly fine, the code runs all the way through, no problem.

 

Yes, when I type the command it autolists in the command prompt and i can select it. it just does not run. I can even netload it and it works perfectly fine.

 

I will do a test with a vanilla plugin and see.

Distinguished Contributor
mcicognani
Posts: 125
Registered: ‎12-01-2004
Message 8 of 18 (461 Views)

Re: AutoCad 2015: autoLoader loading dll but commands not working

05-15-2014 07:43 AM in reply to: dimitri

Dimitri,

is the ribbon loaded on 2015? This should be all work of the autoloader and the xml. It's independent of the dll itself. Check the version Min = 20.0, Max = 20.0, and eventually try to load the cuix manually on 2015, just to be sure the cuix file is good.

 

For the DLL, could it be a stupid thing you overlooked? check the reference to ObjectArx2015, build against 4.5.1 framework, ...

Contributor
mhama
Posts: 11
Registered: ‎01-10-2008
Message 9 of 18 (455 Views)

Re: AutoCad 2015: autoLoader loading dll but commands not working

05-15-2014 07:51 AM in reply to: mcicognani

No checked that too and it is built on 4.5.1 and using the 2015 libraries. It is interesting that i can netload and it works perfectly fine and it will not wih the AutoLoader. I will start with a simple .dll and check

 

Distinguished Contributor
mcicognani
Posts: 125
Registered: ‎12-01-2004
Message 10 of 18 (452 Views)

Re: AutoCad 2015: autoLoader loading dll but commands not working

05-15-2014 08:02 AM in reply to: mhama
was for Dimitri, but I guess it's a good advice for everyone... ;-)

mhama, double check the xml, I spent hours on one of them just for a stupid slash missing. If it's demand loading, you may still see the commands because they're read on startup, but AutoCAD may fail finding the DLL or loading it when you run the actual command...
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.