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

start addin that add a ribbon when AUTOCAD start

3 REPLIES 3
Reply
Message 1 of 4
gots
2945 Views, 3 Replies

start addin that add a ribbon when AUTOCAD start

Hi

 

I'm sure this kind of subject was already discussed, but I haven't find any working solution of my problem.

I have a VB .NET Dll that add a new ribbon in AUTOCAD.

When I load this dll from AUTOCAD, this new ribbun is well added.

I'm trying to start this dll with AUTOCAD Start.

I have tried the solution explaned from this Kean Walmsley page but no succes.

I've tried to load the DLL from the acad.lsp but the DLL is loaded before AUTOCAD load the ribbon, then the dll is well loaded but my new ribbon is not displayed !.

 

Do you have any way to do what I'm trying to do ?

thanks

3 REPLIES 3
Message 2 of 4
StephenPreston
in reply to: gots

Hi gots,

 

As explaiend in the ObjectARX Application Interoperability Guidelines (part of the ObjectARX SDK helpfiles), it is very bad practice to set your plug-in to load on AutoCAD startup unless you have a really compelling reason for doing so. The reason is obvious if you consider a user who has several plug-ins registered to load on startup - they significantly slow down AutoCAD startup.

 

If you're using AutoCAD 2012 or 2013, then I recommend you make use of the Autoloader feature, to automatically load a partial CUIX on startup and set your .NET plug-in to load on command invocation. There's some good info posted here about Autoloader - http://through-the-interface.typepad.com/through_the_interface/2011/09/autodesk-exchange-preparing-y....

 

If you're using AutoCAD 2013, and you really have to load your plug-in on startup (and have your plug-in programmatically create ribbon elements, then you can use the new Autoloader StartupCommand parameter. The XML for that would look something like this:

 

<Components>

  <ComponentEntry ModuleName="./Contents/blah.dll">

     <Commands>

        <Command  LocalCmd="RunMeCmd" GlobalCmd="RunMeCmd" StartupCommand="True" />

     </Commands>

  </ComponentEntry>

</Components>

 

 

Cheers,

Stephen Preston
Autodesk Developer Network
Message 3 of 4
gots
in reply to: StephenPreston

hi

 

thanks for your answer.

We developped our plugin few years ago in VBA. we loaded the plugin with acad.lsp and create our own menu in the menu bar.

I have read that vba will be no longer supported with 2014 autocad release, then we start to convert our plugin in VB .NET and decide to create a ribbon instead of our menu.

As our customer are used to see our plugin at Autocad statrup, we want to keep this behaviour with the ribbon.

So, If I understand, there is no solution with Autcad 2010 and 2011 ?

the only way is to keep our menu or use a menu to add the ribbon by a manual action ?

 

Thanks

Gots

Message 4 of 4
StephenPreston
in reply to: gots

I recommend Autoloader for AutoCAD 2012 upwards. For earleir versions - by adding code inside your plug-in - this discussion thread should give you what you need - http://forums.autodesk.com/t5/NET/ads-queueexp/td-p/3423087. Define the code you want to run as a command, and then queue it up.

 

Cheers,

Stephen Preston
Autodesk Developer Network

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