ComboBox in a custom Ribbon

ComboBox in a custom Ribbon

Anonymous
Not applicable
699 Views
3 Replies
Message 1 of 4

ComboBox in a custom Ribbon

Anonymous
Not applicable

Hello,

 

I'm trying to implement a ComboBox in a custom Ribbon Pannel for Navisworks, but i didn't find any examples or documentation for the subject.

 

I can't use a split button because i need to be able to modify the Items List using some code in the plugin (which is not possible in the case of a split button).

 

Is it possible to use a ComboBox  in a custom ribbon ?  if yes, any example codes are available ?

 

Thanks in advance,

 

Best Regards.

0 Likes
700 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

I found the following peace of code used to define the default Navisworks Ribbons (in the Ribbon.xaml file located in the Navisworks Manage directory ), it defines a TreeCombo element ( or a combobox) :

 

 

<local:NWRibbonTreeCombo Width="65" MinWidth="65" Id="SelectionSetsTreeCombo.Navisworks" Image="pack://siteOfOrigin:,,,/Images/Ribbon_SelectionSets_16.ico" IsSynchronizedWithCurrentItem="False" Text="Jeux" UseCommandDisplayTextWhenClosed="False" x:Uid="local:NWRibbonTreeCombo_Sets">
	<local:NWRibbonTreeCombo.MenuItems>
		<local:NWRibbonMenuItem Id="SelectionSetsManageCommand.Navisworks" Text="Gérer les jeux..." x:Uid="local:NWRibbonMenuItem_ManageSets"/>
	</local:NWRibbonTreeCombo.MenuItems>
</local:NWRibbonTreeCombo>

i tried to implement it in my xaml code but Navisworks always crashes and i can't debug it (the autodesk.navisworks.api.pdb symbols file is not found). Besides, i didn't define it in the C# code (i don't know if it is possible).

 

 

I don't know if this is availble only in the native code of Navisworks or is it possible to define such an object using the Navisworks API ? 

 

Any help please ? thanks in advance.

 

Best Regards,

0 Likes
Message 3 of 4

xiaodong_liang
Autodesk Support
Autodesk Support

Hi @Anonymous ,

 

After a lot of tests, I have to say sorry I did not figure out. And after double checking with engineer team, I got to know there might be some ribbon items a plugin just cannot create. The ones in the sample (CustomRibbon) are the only ones we supported at the time. We apologize for the inconvenience.

 

I logged a wish #NW-54970 to ask for Ribbon API supports more types of UI elements.

Message 4 of 4

Anonymous
Not applicable

Hello, Mr. @xiaodong_liang ,

 

thank you very much for your kind reply. Unfortunately, that's exactly what i guessed. I hope that more elements are supported in future versions of Navisworks API.

 

By the way, for those who are interested, there are other elements that i found in the Official Ribbon.xaml that worked well using Navisworks API (which were not mentioned in the CustomRibbon example code), such as : NWRibbonLabel, NWRibbonStaticLabel and NWRibbonTextBox. (other elements are there, but i didn't test if they work).

 

Best Regards,