Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Ribbon DropDown menu trick

dsmits
Advocate

Ribbon DropDown menu trick

dsmits
Advocate
Advocate

 

 

some Kudos would be great 🙂

 

after button 1 & 2 you can pretty much just copy and paste your ribbon button/macro/cmd right in order like you normally would edit your ribbon (notepad++). for button 1 and 2 you need to keep this format to a point.

Note---you cannot edit your tree in power mill, you will have to do your changes in notepad and import your ribbon in. But after you import it in you can move your dropdown to another ribbon.

so i would finish your drop down and then move to your desire ribbon

 

Note-- you can make drop downs from other dropdown items but does get pretty confusing. ill post that one too if i still have.

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<entry application="PowerMill" application_version="1" type="uiRIBBONBAR" version="1">

  <entry type="uiCATEGORY">
    <resource key="uiLABELSTRING" value="TREE"/>
    <entry type="uiPANEL">
      <resource key="uiLABELSTRING" value="GROUP NAME"/>
      <resource key="uiRIBPANELALIGNMENT" value="false"/>
      <entry base_widget="Ribbon.Home.Macro.MacroRun" recursive="false">
        <resource key="uiLABELSTRING" value="THIS IS NUMBER 1"/>
        <resource key="uiBITMAP" value="CETEXTAROUNDCIRCLE"/>
        <resource key="uiCOMMAND" value="print = 1"/>
        <resource key="uiDYNAMICHELP" value="Text"/>
        <entry type="uiICONBUTTON">
         <resource key="uiLABELSTRING" value="This is number 2"/>
          <resource key="uiBITMAP" value="ROUTING"/>
          <resource key="uiCOMMAND" value="print = 2"/>
          <resource key="uiEDITTYPE" value="CommandButton"/>
        </entry>
      </entry>
      <entry type="uiICONBUTTON">
       <entry type="uiICONBUTTON">
          <resource key="uiLABELSTRING" value="This is Number 3"/>
          <resource key="uiBITMAP" value="ROUTING"/>
          <resource key="uiCOMMAND" value="print = 3"/>
          <resource key="uiEDITTYPE" value="CommandButton"/>
        </entry>
        <entry type="uiICONBUTTON">
          <resource key="uiLABELSTRING" value="This is Number 4"/>
          <resource key="uiBITMAP" value="ROUTING"/>
          <resource key="uiCOMMAND" value="print = 4"/>
          <resource key="uiEDITTYPE" value="CommandButton"/>
        </entry>
        <entry type="uiICONBUTTON">
          <resource key="uiLABELSTRING" value="This is Number 5"/>
          <resource key="uiBITMAP" value="ROUTING"/>
          <resource key="uiCOMMAND" value="print = 5"/>
          <resource key="uiEDITTYPE" value="CommandButton"/>
        </entry>
        <entry type="uiICONBUTTON">
          <resource key="uiLABELSTRING" value="This is Number 6"/>
          <resource key="uiBITMAP" value="ROUTING"/>
          <resource key="uiCOMMAND" value="print = 6"/>
          <resource key="uiEDITTYPE" value="CommandButton"/>
        </entry>
      </entry>
    </entry>
  </entry>
</entry>

ribbontree.pngplease like for sharing 

Reply
Accepted solutions (1)
6,663 Views
40 Replies
Replies (40)

Beta_Librae
Advocate
Advocate

Is that how you created the slide bar?


Kind Regards,
Not cnc, you can call me Peabrain
0 Likes

barr.jarryd
Advocate
Advocate

In regards to this, my ribbons keep defaulting back to the Home ribbon when I close out of a window; toolpath for example.

 

Is there a way to set it so that my Custom toolbar is the default to return upon closing a window?

 

Thank you

 

Jarryd Barr

0 Likes

danmic7JH66
Advocate
Advocate

@barr.jarryd wrote:

In regards to this, my ribbons keep defaulting back to the Home ribbon when I close out of a window; toolpath for example.

 

Is there a way to set it so that my Custom toolbar is the default to return upon closing a window?

 

Thank you

 

Jarryd Barr


Not that I'm aware of but you can add this command to the end of your macros to go back to your custom ribbon.

FORM RIBBON TAB UICATEGORY

 

barr.jarryd
Advocate
Advocate

Thank you

I will restructure to run just macros so that it will work this way.

 

Thank you

Jarryd Barr

0 Likes

BS_agru
Advocate
Advocate

@Beta_Librae wrote:

Curious how you made the slide bar shown in this thread. I think it could be a pretty cool addition to the software. What are you using it for?


Hi,

someone figured out how to add a Slidebar?

0 Likes

glaubergimenez
Enthusiast
Enthusiast
 
 
Hello!
I don't have much experience with .XML files. But what is this code about? could you share an image or video of the final result?
I am not understanding the result.😖

Where did you insert this text in the option_menu.xml file inside the ribbon_customisation.xml file?
0 Likes

Beta_Librae
Advocate
Advocate

 Sorry, I think it's possible, but I don't have anything that works. Didn't ever really get a clear answer about how to create it, and I haven't figured it out myself.


Kind Regards,
Not cnc, you can call me Peabrain
0 Likes

BS_agru
Advocate
Advocate

@Beta_Librae wrote:

 Didn't ever really get a clear answer about how to create it, and I haven't figured it out myself.


 

...dito...🙄

0 Likes

johnc4668
Advocate
Advocate

@dsmits @barr.jarryd @Beta_Librae @danmic7JH66   This post has me intrigued and i cant quit this! Take a look at my xml file here if you would. I have the drop down button on my ribbon but i am stuck on how to add more macro buttons to the drop down. Heres part of my xml and my ribbon screen shots:

 

</entry>
<entry type="uiRIBMENUBUTTON">
<resource key="uiLABELSTRING" value="Drilling Methods"/>
<entry type="uiPUSHBUTTON">
<resource key="uiLABELSTRING" value="3ax Dm Standard Steel"/>
<resource key="uiBITMAP" value="STRATEGY__METHOD"/>
<resource key="uiCOMMAND" value="MACRO &quot;Z:\Software\PowerMill\Macros\3ax Dm Standard Steel.mac&quot;"/>
<resource key="uiUSERDATA" value="Z:\Software\PowerMill\Macros\3ax Dm Standard Steel.mac"/>
<resource key="uiEDITTYPE" value="MacroButton"/>
</entry>
</entry>

 

2021-09-15_9-08-24.png

 

 

 

 

 

 

0 Likes

glaubergimenez
Enthusiast
Enthusiast

I got this somewhere on this forum. Merits for the Creator.

 

Import this XML and edit in notepad ++, how many instances would it solve?

Then move the Menu according to the image.

 

move_menu.jpg

BS_agru
Advocate
Advocate

Hi,

look at my Sample.xml

rui_rita
Advocate
Advocate

Hi @johnc4668 

this part is a button, just  copy/paste and change values as many buttons you need to add

<entry type="uiPUSHBUTTON">
<resource key="uiLABELSTRING" value="3ax Dm Standard Steel"/>
<resource key="uiBITMAP" value="STRATEGY__METHOD"/>
<resource key="uiCOMMAND" value="MACRO &quot;Z:\Software\PowerMill\Macros\3ax Dm Standard Steel.mac&quot;"/>
<resource key="uiUSERDATA" value="Z:\Software\PowerMill\Macros\3ax Dm Standard Steel.mac"/>
<resource key="uiEDITTYPE" value="MacroButton"/>
</entry>



Os melhores cumprimentos | Best regards
Rui Rita
________________________________
NEWCAM, Lda.

johnc4668
Advocate
Advocate
Yes, this was the same file i got it from but didnt need the command button "my button 1". I want to add more macro buttons "my button 2" to this drop down but not sure how to edit the xml file. Can you copy buttons in the customise ribbon window in powermill, didnt think you could?

glaubergimenez
Enthusiast
Enthusiast

The file that @BS_agru sent, I think is more prepared for what you need, but without icons. It's a very interesting option once you get familiarized with the menu. 👏👏

0 Likes

rui_rita
Advocate
Advocate

@johnc4668  you have to edit your xml file in text editor.

and any change to the dropdown menu you should always use a text editor. any change you make in powermill window, you could be messing  with the dropdown menu.

 



Os melhores cumprimentos | Best regards
Rui Rita
________________________________
NEWCAM, Lda.

johnc4668
Advocate
Advocate

@glaubergimenez @rui_rita @BS_agru  Got it! You guys rule! Love this forum. All good now

 

As someone previously said i too am playing with powermill buttons like a kid now 🙂

 

2021-09-15_10-44-27.png

BS_agru
Advocate
Advocate

👍 Thanks especially to @dsmits & @NathanWoodward !

PGI-49
Contributor
Contributor

Is it possible to directly call in a strategy template and what is the code? I can't seem to get it to go for some reason.

0 Likes

tiago.coelhoMEKWZ
Explorer
Explorer

Thanks for your help!

 

One sugestion, use 'Ribbon.FeatureGroup.Draw.DrawOptions' instead 'Ribbon.Home.Macro.MacroRun' if you don't want your drop down button "clickable".

 

It is possible to create a tree like that 

tiagocoelhoMEKWZ_0-1643646518259.png

just do an base_widget inside another.

tiagocoelhoMEKWZ_1-1643646642819.png

 

 

 

Hemant_2022
Contributor
Contributor

Hello Sir,

I am trying to make drop down menu with child button. I attached my sample file here. But it throws error  "failed to import the ribbon customization". please do the needful.

 

Thanks

 

 

0 Likes