Community
PowerMill Forum
Welcome to Autodesk’s PowerMill Forums. Share your knowledge, ask questions, and explore popular PowerMill topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

anyone made a table button containing macro buttons? is it possible?

12 REPLIES 12
SOLVED
Reply
Message 1 of 13
Anonymous
1288 Views, 12 Replies

anyone made a table button containing macro buttons? is it possible?

I need to create a macro buttons table in wich I can include some macro buttons.

this because I am used to have one toolbar for each of my milling machines.

until the 2017 version
it was possible to customize and visualize or hide a lot of custom toolbars.

I had a macro to make appear the toolbar of each specific machine.

now it is not possible because the ribbons loose their order

Now I need to create a table that I can recall and keep open since I am working, in sobstitution to these toolbars.

I would recal a different table for each machine, in substitution to the old cusatom toolbar

Is there anyone outthere that by chance made someting similar?

thanks in advance for helping me

greetings

Labels (1)
12 REPLIES 12
Message 2 of 13
HMC400
in reply to: Anonymous

If I understand what you want to do I think there are 2 options.
1 Customize the Ribbon with one card per machine.
2 use API or Plugin.

Message 3 of 13
Sean570
in reply to: Anonymous

I think you would have to make a plugin to do what you want, though doing so is a lot of work. There is some good documentation on how to create a plugin in the folder where powermill is installed on your computer if you want to go that route. 

Message 4 of 13
Anonymous
in reply to: HMC400

I aborted the ribbon solution.

I think to use a "fileopen" command to recall a table, but I just only made drop down menu macro, never with tables

Message 5 of 13
TK.421
in reply to: Anonymous

you can do that through the API or a plugin. There is documentation for plugins in 'C:\Program Files\Autodesk\PowerMill 2021\file\plugins\documentation' or there is the API Forum.

--------------------------------------
the numbers never lie
Message 6 of 13
Anonymous
in reply to: TK.421

You can create a ribbon for each machine export (one XML file for each machine) it and than load the needed ribbon with a macro

 

// Reset the Ribbon
EDIT CUSTOMRIBBON RESET

// Load Ribbon for Machine 1
EDIT CUSTOMRIBBON IMPORT FILEOPEN "D:\Ribbons\Machine_1.xml"
EDIT CUSTOMRIBBON APPLY FORM CANCEL CUSTOMRIBBON

 

Message 7 of 13
Anonymous
in reply to: Anonymous

Here is a small example to demonstrate what I mean in the post above.

 

1) Copy the files from the zip file to "C:\Ribbon\"
2) Save your current ribbon because the macro will reset your ribbon. To do this, go to the customise ribbon dialog and export your current ribbon.
3) Import the "SelectMachine.xml" Ribbon

 

If you now select a machine in the "Select Machine" ribbon, the macro will load the corresponding machine ribbon

Message 8 of 13
Anonymous
in reply to: Anonymous

Yeah! thank you very much! that's what I made in 2017 version with a macro hiding/visualizing the custom toolbars.

But without your help I never could do this in 2020 version! You are a monster!

I just write by hand in notepad text my macros.

 

Just if you see the picture attached, how can I put your precious parameter visualizator buttons down on the right to the machine buttons instead of in top quick access toolbar?

(Of course If you let me get your precious buttons only!)

Because I use the quick access toolbar full of my others buttons.

 

THANK YOU VERY VERY MUCH!

Message 9 of 13
Anonymous
in reply to: Anonymous

Ups, I didn't realize that PowerMill also exported my quick access toolbar 😆

 

If I get you right, you want the toolpath parameters in your machine ribbon and not in the quick access toolbar. The easiest way to do this is to edit your machine ribbon XML file.

 

Add this block to your machine XML file as shown in the picture below.

<entry type="uiPANEL">
      <resource key="uiLABELSTRING" value="TP Parameters"/>
      <resource key="uiRIBPANELALIGNMENT" value="JustifyColumns"/>
      <entry type="uiTEXTLABEL">
        <resource key="uiLABELSTRING" value="Spindle Speed"/>
        <resource key="uiDYNAMICHELP" value="Spindle Speed"/>
        <resource key="uiEXPRESSION" value="'D = ' + round(SpindleSpeed.Value, 0) + 'U/min'"/>
        <resource key="uiEDITTYPE" value="ExpressionField"/>
      </entry>
      <entry type="uiTEXTLABEL">
        <resource key="uiLABELSTRING" value="Cutting Feed Rate"/>
        <resource key="uiDYNAMICHELP" value="Cutting Feed Rate"/>
        <resource key="uiEXPRESSION" value="'V = ' + FeedRate.Cutting.Value + 'mm'"/>
        <resource key="uiEDITTYPE" value="ExpressionField"/>
      </entry>
      <entry type="uiTEXTLABEL">
        <resource key="uiLABELSTRING" value="Surface Speed"/>
        <resource key="uiDYNAMICHELP" value="Surface Speed"/>
        <resource key="uiEXPRESSION" value="'vc = ' + round(FeedRate.CuttingSpeed.Value, 0) + 'm/min'"/>
        <resource key="uiEDITTYPE" value="ExpressionField"/>
      </entry>
      <entry type="uiTEXTLABEL">
        <resource key="uiLABELSTRING" value="Feed/Tooth"/>
        <resource key="uiDYNAMICHELP" value="Feed/Tooth"/>
        <resource key="uiEXPRESSION" value="'fz = ' + round(FeedRate.FeedPerTooth.Value, 2) + 'mm'"/>
        <resource key="uiEDITTYPE" value="ExpressionField"/>
      </entry>
      <entry type="uiTEXTLABEL">
        <resource key="uiLABELSTRING" value="Time"/>
        <resource key="uiDYNAMICHELP" value="Time"/>
        <resource key="uiEXPRESSION" value="time_to_string( $toolpath.statistics.LeadsandLinks.Times.plunge+$toolpath.statistics.LeadsandLinks.Times.ramp+$toolpath.statistics.LeadsandLinks.Times.rapid+$toolpath.statistics.LeadsandLinks.Times.others+$toolpath.statistics.cuttingmoves.Times.arcs+$toolpath.statistics.cuttingmoves.Times.linear; 'M')"/>
        <resource key="uiEDITTYPE" value="ExpressionField"/>
      </entry>
    </entry>

 

TP parameter block.png

 

I also added a new sample machine_1.xml with the changes.

 

You also have to replace the <entry type="uiQUICKACCESSTOOLBAR"> block in the SelectMachine.xml with your quick access toolbar block. Or an even cleaner way is to create an own XML file for the quick access toolbar and load it additionally with the SelectMachine.xml (than you can delete the <entry type="uiQUICKACCESSTOOLBAR"> block in the SelectMachine.xml)

 

// Reset the Ribbon
EDIT CUSTOMRIBBON RESET
// Load Quick Access Toolbar
EDIT CUSTOMRIBBON IMPORT FILEOPEN "C:\Ribbon\QuickAccessToolbar.xml"
// Load Select Machine Ribbon	
EDIT CUSTOMRIBBON IMPORT FILEOPEN "C:\Ribbon\SelectMachine.xml"

 

I tend to store all my different menu bars in their own xml file, so I can load and unload them just as i need them.

 

 

 

Message 10 of 13
Anonymous
in reply to: Anonymous

ok thank you very much 

when I will edit the text with my buttons in the machines bar I will have an error message.

I don't understand the entry

       </entry>
     </entry>

</entry>

 

structure, anyway I will remake my bar machines.

anyway I could insert the parameters machine

thank you again , you are unselfish.

greetings

Message 11 of 13
Anonymous
in reply to: Anonymous

That is XML.

Whenever you open a Tag, you have to close it.

<entry xxx>    //Opens the Tag
   ...
</entry>       //Closes the Tag

 

XML Tags.png

Message 12 of 13
Anonymous
in reply to: Anonymous

ok thank you!

now, only if you have a bit more time for me, otherwise, ok the same,

I can't put images icon, only text, in your parameters.

the other bar buttons I can put the icnon, in your I can't.

can you?

anyway, If you can't answer It is ok the same, too much.

gretings

Message 13 of 13
Anonymous
in reply to: Anonymous

ok ok I found it how to put icon: editing the text!!!

no more waist of time for you!

ok

thank you

greetings

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report