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

AppAutoload in 2013 LoadOnCommandInvocation seems broken

22 REPLIES 22
SOLVED
Reply
Message 1 of 23
tyronebk
1875 Views, 22 Replies

AppAutoload in 2013 LoadOnCommandInvocation seems broken

I have searched but have been unable to find anything related to this. This is not strictly a .net issue.

Is LoadOnCommandInvocation="True" broken in 2013? It used to work fine in 2012 but in 2013 all .DLL and lisp files are simply being loaded at launch?

Even the simple DOTNETTEST2 bundle (made available by the APN Dev guys last year) show the same behaviour.

Is there something I'm missing?

Here's the PackageContents.xml from the DOTNETTEST2:

Spoiler

<?xml version="1.0" encoding="utf-8" ?>

<ApplicationPackage SchemaVersion="1.0" >

<Components>

<ComponentEntry AppName="DOTNETTEST2" ModuleName="./Contents/2013/AutoloaderDotNetSample2.dll" LoadOnCommandInvocation="True" >

<Commands GroupName="DevDays2010">

<Command Global="DOTNETTEST2" Local="DOTNETTEST2" />

</Commands>

</ComponentEntry>

</Components>

</ApplicationPackage>

I searched through the now redacted SP 1 release notes and saw no mention of this problem.

22 REPLIES 22
Message 21 of 23
osvaldast
in reply to: StephenPreston

No luck I’m afraid.

 

Specifying group name in CommandMethod as following: [CommandMethod("HW_Group", "HW_HelloWorld", CommandFlags.Modal)] makes no difference for me. Still it works fine in Civil 2013, but it does not work in Civil 2014, unless I change LoadOnCommandInvocation with LoadOnAutoCADStartup. Is there any other attributes I need to set?

 

I have tried calling the command from command line as HW_HelloWorld and HW_Group.HW_HelloWorld. In both cases I am getting “Unknown command "HW_HELLOWORLD".  Press F1 for help”.

 

Just to clarify, I am using AutoCAD Civil 3D 2014 SP1, with Product Version stated as I.108.0.4, SP1.

Message 22 of 23
StephenPreston
in reply to: osvaldast

I don't have Civil 3D installed, so I used a test DLL with AutoCAD 2014. I got this XML to work for LoadOnCommandInvocation:

 

<?xml version="1.0" encoding="utf-8" ?>
<ApplicationPackage SchemaVersion="1.0" Name="Hello World" ProductCode="{EEA4994B-1F8F-44AD-A989-BC04E80FE71E}">
 <CompanyDetails Name="Hello World Engineering" Email="support@hello.world"/>
  <Components>
    <RuntimeRequirements SupportPath="./Contents" Platform="AutoCAD|Civil3D" OS="Win64" SeriesMin="R19.0" SeriesMax="R19.1" />
    <ComponentEntry AppName="HelloWorld" ModuleName="./Contents/YOURDLLNAME.dll" AppDescription="Hello World test module" LoadOnCommandInvocation="True">
      <Commands GroupName="HW_Group">
        <Command Local="HW_HelloWorld" Global="HW_HelloWorld" />
      </Commands>
    </ComponentEntry>
  </Components>
</ApplicationPackage>

 

But I'm seeing some unexpected behavior - LoadOnCommandInvocation seems to breakif I delete one or both of the Appname or AppDescription parameters from the <ComponentEntry/> element.

 

As long as you include all the elements and parameters in my example above you should be fine. But I consider the requirement for an 'AppDescription' to be a bug (one could argue that AppName could be useful for tracking in the registry). I'll go ahead and report that to our dev team.

 

Please test this yourself on C3D and see if it works now.

 

 

Cheers,

Stephen Preston
Autodesk Developer Network
Message 23 of 23
osvaldast
in reply to: StephenPreston

Adding AppDescription attribute to ComponentEntry element does the trick.

I can confirm LoadOnCommandInvocation works on Civil 2014, then AppDescription is specified.

 

Thank you for your help Stephen

All the best

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