AutoCAD 2010/2011/2012 DWG Format
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
common ribbontab in different partial cui
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
188 Views, 4 Replies
04-11-2012 05:10 AM
Hello,
is this this possible?
I have a lot of tools with separate installers. But the ribbon-panales merge in one ribbon-tab.
regards
Mario
Re: common ribbontab in different partial cui
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-11-2012 05:16 AM in reply to:
mario.rosenbohm
Hi,
you got a lot of tools? ... from different vendors or from one vendor?
or you have some tools to distribute and need a solution for how such an installer should work?
- alfred -
-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Re: common ribbontab in different partial cui
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-11-2012 05:59 AM in reply to:
alfred.neswadba
Hello alfred,
its round 6 tools with her own cui and installer.
Regardless of the panels will be installed all in the same tab.
regards
mario
Re: common ribbontab in different partial cui
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-11-2012 07:13 PM in reply to:
mario.rosenbohm
it works, if you create a ribbon tab manually with the equal alias in the main-cuix.
Now... How can i create a ribbon tab in the main-cuix with .net ?
Re: common ribbontab in different partial cui
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-11-2012 08:41 PM in reply to:
mario.rosenbohm
here ist the "main-ribbontab-solution" in c#
public static Boolean createMainRibbonTab(String tabName, String tabTitle, String tabId, IList<String> workspaces)
{
Boolean result = false;
String mainCuixName = Application.GetSystemVariable("MENUNAME") + ".cuix";
Autodesk.AutoCAD.Customization.CustomizationSectio n maincuix = new Autodesk.AutoCAD.Customization.CustomizationSectio n(mainCuixName, false);
Autodesk.AutoCAD.Customization.RibbonRoot acRibbonRoot = maincuix.MenuGroup.RibbonRoot;
Autodesk.AutoCAD.Customization.RibbonTabSource acRibbonTabSource = acRibbonRoot.FindTabWithAlias(tabName.ToUpper());
if (acRibbonTabSource == null)
{
try
{
acRibbonTabSource = new Autodesk.AutoCAD.Customization.RibbonTabSource(acR ibbonRoot);
acRibbonTabSource.Name = tabName;
acRibbonTabSource.Id = tabId;
acRibbonTabSource.Aliases.Add(tabName.ToUpper());
acRibbonTabSource.Text = tabTitle;
acRibbonRoot.RibbonTabSources.Add(acRibbonTabSourc e);
Autodesk.AutoCAD.Customization.WSRibbonTabSourceRe ference acRibbonTabSourceReference;
if (workspaces == null)
{
foreach (Autodesk.AutoCAD.Customization.Workspace item in maincuix.Workspaces)
{
acRibbonTabSourceReference = Autodesk.AutoCAD.Customization.WSRibbonTabSourceRe ference.Create(acRibbonTabSource);
acRibbonTabSourceReference.SetParent(item.Workspac eRibbonRoot);
item.WorkspaceRibbonRoot.WorkspaceTabs.Add(acRibbo nTabSourceReference);
}
}
else
{
foreach (String wsName in workspaces)
{
Autodesk.AutoCAD.Customization.Workspace acWorkSpace = maincuix.getWorkspace(wsName);
if (acWorkSpace != null)
{
acRibbonTabSourceReference = Autodesk.AutoCAD.Customization.WSRibbonTabSourceRe ference.Create(acRibbonTabSource);
acRibbonTabSourceReference.SetParent(acWorkSpace.W orkspaceRibbonRoot);
acWorkSpace.WorkspaceRibbonRoot.WorkspaceTabs.Add( acRibbonTabSourceReference);
}
}
}
maincuix.Save();
result = true;
}
catch
{ }
}
else
{
result = true;
}
return result;
}
