Author Topic: ribbon in bundle  (Read 2079 times)

0 Members and 1 Guest are viewing this topic.

shers

  • Guest
ribbon in bundle
« on: August 26, 2015, 05:57:39 AM »
Hi,

I have created a ribbon with a tab with code and has two buttons in it. When my command is typed, after netload, the ribbon is displayed. Then I use the click event to display the corresponding windows for the buttons. Now I want to build this, so that when the user installs it, it should be added as the same way as I debug. How can I accomplish this?

Thanks

MexicanCustard

  • Swamp Rat
  • Posts: 705
Re: ribbon in bundle
« Reply #1 on: August 26, 2015, 08:02:35 AM »

Now I want to build this, so that when the user installs it, it should be added as the same way as I debug. How can I accomplish this?


Are you asking how to create an Autoloader Bundle? Autoloader

Are you asking how to make the Ribbon appear automatically after loading? IExtensionApplication

The Ribbon can also be loaded via a "cuix" file and a Bundle.  This method will create and display the Ribbon Tab at startup.
Revit 2019, AMEP 2019 64bit Win 10

BlackBox

  • King Gator
  • Posts: 3770
Re: ribbon in bundle
« Reply #2 on: August 26, 2015, 12:58:11 PM »
If implementing code-based Ribbon components using IExtensionApplication and implicitly LoadOnAutoCADStartup="true" within your Autoloader .bundle's PackageContents.xml, then be sure to implement an Application.Idle event handler, etc. in order to ensure that the Ribbon UI has been initialized prior to attempting to add to same.

[Edit] - If distributing to others, I prefer to provide .CUIx so users can incorporate into their own Workspace as they see fit, YMMV.
"How we think determines what we do, and what we do determines what we get."

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: ribbon in bundle
« Reply #3 on: August 26, 2015, 02:51:38 PM »
[Edit] - If distributing to others, I prefer to provide .CUIx so users can incorporate into their own Workspace as they see fit, YMMV.

Which is greatly appreciated.  Dynamically generated ribbon tabs/panels are a PITA to manage with user-specific workspaces.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

BlackBox

  • King Gator
  • Posts: 3770
Re: ribbon in bundle
« Reply #4 on: August 26, 2015, 03:14:09 PM »
[Edit] - If distributing to others, I prefer to provide .CUIx so users can incorporate into their own Workspace as they see fit, YMMV.

Which is greatly appreciated.  Dynamically generated ribbon tabs/panels are a PITA to manage with user-specific workspaces.

All I can say, is that I'm a civil designer first, and a developer second, which is why I strive to provide others what makes the most sense to me as a CAD user.

All of my AX app .CUIx components call Commands, be they LISP Defun, or .NET CommandMethod, so that they are accessible from both Command Line, or UI....


[rant]
... Unlike the myriad native MenuItem.Click calls to the underlying Method() which define a given CommandMethod, without Locking the Document, so I can not catch DocumentLockModeChanged event, and Veto(). Civil 3D's Toolspace CREATEDATASHORTCUTS context menu item is a prime example. Grrr
[/rant]


I happen to think that the requirement to provide .CUIx in order to have one's app published at AX is a general waste of time, especially given how .CUIx / .MNR files remain after successful uninstallation of even a formal AX App; but that's just this man's opinion. Haha

Cheers
« Last Edit: August 26, 2015, 03:19:30 PM by BlackBox »
"How we think determines what we do, and what we do determines what we get."