PowerMILL Excel SetupSheet plugin

PowerMILL Excel SetupSheet plugin

michael.grenier4GVTU
Autodesk Autodesk
25,975 Views
150 Replies
Message 1 of 151

PowerMILL Excel SetupSheet plugin

michael.grenier4GVTU
Autodesk
Autodesk

Hi Everyone,

 

I've been working on another plugin last year that was just publicly released.  This one will let you create an excel template to export your setupsheets.  It gives you a bit more flexibility than the current setupsheet we have in PowerMILL.  On top of that, since the source code is available you can do whatever you want with it.  The plugin include a folder of sample files and some documentation as to how to use it.

 

I'm joining the pdf I made to give you an idea of what is available but also what can be done with it.

 

https://github.com/Autodesk/powermill-api-examples/tree/master/addin-excel-setup-sheet

 

Enjoy!

 

Michael



Michael Grenier
Senior Solution Engineer
Accepted solutions (2)
25,976 Views
150 Replies
Replies (150)
Message 121 of 151

nathanANTQX
Advocate
Advocate

We are defiantly not able to debug the issue this side as our Default langue is G code 🤣.  We know the basics of java and html. Enough to entertain a basic conversation. 

 

I've Installed the latest compile of your plugin 1.0.10 hopefully it was something in the older compile of the plugin. 

 

We will keep an eye out for a project that crashes and upload here as soon as we find one. 

Sometimes its months before something breaks, then it might not work for 3 days straight. 

 

Thanks in advance!

0 Likes
Message 122 of 151

michael.grenier4GVTU
Autodesk
Autodesk

@nathanANTQX No problem at all, I'm not going anywhere so when you can reproduce the problem, I'll take a look and post results here so that others can see.



Michael Grenier
Senior Solution Engineer
0 Likes
Message 123 of 151

nathanANTQX
Advocate
Advocate

Hi @michael.grenier4GVTU

 

Finally a failed Project file... hopefully you can diagnose what is going on in the plugin.... ( still has the lockfile in the project, please remove when checking)

 

Kind Regards Nathan

0 Likes
Message 124 of 151

michael.grenier4GVTU
Autodesk
Autodesk

Hi @nathanANTQX,

 

I'm happy to take a look at it for you. Can you send your Excel template file so I can run it with your PM project in the debugger?

 

Thanks

 

Michael



Michael Grenier
Senior Solution Engineer
0 Likes
Message 125 of 151

nathanANTQX
Advocate
Advocate

@michael.grenier4GVTU  Attached is our template for our setup sheets. 

 

hope you are able to find something in the debugger.

 

kind regards Nathan

0 Likes
Message 126 of 151

robincharly
Contributor
Contributor

Hi @michael.grenier4GVTU ,

 

How to add sequential serial numbers in your template. Supposing if have 5 toolpaths in an NC program the serial number column should be from 1 to 5 as shown in the below image. 

 

What parameter should I add to the same in the excel file?

 

robincharly_0-1702895560418.png

 

 

0 Likes
Message 127 of 151

michael.grenier4GVTU
Autodesk
Autodesk

Hi @Anonymous and @robincharly  ,

 

the problem reported by @nathanANTQX  is coming from the toolpath 41_chamfer_D6,0 which has no toolpath segment.  When the macro runs, it always extracts the properties of the toolpath to get it's XYZ min/max values but when it reaches this one, since it's empty it can't find the values and crashes.  I just made a change to the plugin so it checks for whether the toolpath is empty or not to avoid this problem.  That said, you may want to check to be sure this is expected...

@robincharly, There are no current parameter to do this in the plugin you are running so, this being extremely simple to add and since I was trying to understand what was going on with @nathanANTQX project, I used the opportunity to add {toolpath.lineid} and {tool.lineid} for you which will increment of 1 for each line within the setupsheet.  I've said that before, I'm not officially supporting this code anymore since it was released to everyone years ago but happy to do those two fixes since they are extremely simple and can probably help other users.

Thanks again everyone for using this plugin, it's always great to see people using stuff I wrote thinking it could simplify the creation of setupsheets in PowerMill.

 

@nathanANTQX and @robincharly , let me know how this works!



Michael Grenier
Senior Solution Engineer
Message 128 of 151

robincharly
Contributor
Contributor

Hi @michael.grenier4GVTU 

 

I have installed the plugin & while running my powermill 2024 crashes.

 

Kindly give a solution asap.

 

Thanks in advance.

0 Likes
Message 129 of 151

nathanANTQX
Advocate
Advocate

Happy New Year all, welcome to 2024, hope its a good one for all of you.

 

Any news on the plugin if its up and running after the changes.

 

kind regards Nathan

0 Likes
Message 130 of 151

robincharly
Contributor
Contributor

Hi @michael.grenier4GVTU 

 

New year Wishes and Hope you are doing good. We are Autodesk CAM resellers in India. At one of our customer site we tried to implement The Excel Setup sheet plugin and PowerMill is crashing without any crash report. We have also repaired the Microsoft 365 through the control panel and still the same crash is occuring.

At your convenient time it would be helpful if I can reach out to you through a Zoom session with the customer's PC to solve this crash issue.

Looking forward to your reply.

 

Regards
Robin

0 Likes
Message 131 of 151

michael.grenier4GVTU
Autodesk
Autodesk
Hi Robin,
Without having access to a debugger on the problematic PC, it's hard for me to debug anything. The source code to this addin was released so that people could do this by themselves as it's hard for me to support every customer using it. That said, I'll do my best to support you. Few things you need to be aware about that addin:
1-The template must be selected in the options or it will not work
2-The pc has to be running windows and PowerMill in English
3-Keywords used in the template must be typed in correctly so it's a good practice to try with one of the supplied test template.
My first bet would be that the plugin is used on a non English widnows and PowerMill session.
If you've verified 1,2 and 3 and they are all correct, then we can see what's the best next step to help out.
Let me know if that helps.
Thanks
Michael


Michael Grenier
Senior Solution Engineer
0 Likes
Message 132 of 151

nathanANTQX
Advocate
Advocate

@michael.grenier4GVTU 

 

Hope the year has been treating you well, i was hoping you could possibly add the following variables into the Excel Setup sheet. 

It is listed in the Variable list for the Powermill Setup sheets in HTML, Hopefully it can be added into the Excel Variables.

nathanANTQX_0-1725008814395.png

Would make it possible to see the A / B / C rotations per toolpath within the setup sheet.

Kind regards Nathan

0 Likes
Message 133 of 151

michael.grenier4GVTU
Autodesk
Autodesk

Hi @nathanANTQX ,

 

I would normally not take requests fearing it would never end but I thought I could use this one to give an idea what is actually required behind the scene to make this work.  I've done the modification and joining the new plugin here.  If you look at the documentation you will find 3 new parameters doing what you asked.  The code behind the scene to do it looks like the following:

 

//Extract Toolpath angles from OutputWorkplane
if (NCProgWP == "world")
{
PowerMILLAutomation.ExecuteEx("DEACTIVATE WORKPLANE");
if (ToolpathWP == "world")
{
ToolpathAngleX = 0;
ToolpathAngleY = 0;
ToolpathAngleZ = 0;
}
else
{
PowerMILLAutomation.ExecuteEx("DIALOGS MESSAGE OFF");
string SizeWP = PowerMILLAutomation.ExecuteEx("SIZE WORKPLANE '" + ToolpathWP + "'");
PowerMILLAutomation.ExecuteEx("DIALOGS MESSAGE ON");
string[] SizeWpSplit = SizeWP.Split(' ');
bool FoundAngles = false;
ToolpathAngleX = 9999;
ToolpathAngleY = 9999;
ToolpathAngleZ = 9999;
foreach (string Item in SizeWpSplit)
{
if (FoundAngles && ToolpathAngleX == 9999 && Item != "")
{
ToolpathAngleX = double.Parse(Item);
}
else if (FoundAngles && ToolpathAngleY == 9999 && Item != "")
{
ToolpathAngleY = double.Parse(Item);
}
else if (FoundAngles && ToolpathAngleZ == 9999 && Item != "")
{
ToolpathAngleZ = double.Parse(Item);
break;
}
if (Item.IndexOf("Angles:") > 0)
{
FoundAngles = true;
}
}
}
}
else
{
if (ToolpathWP == NCProgWP)
{
ToolpathAngleX = 0;
ToolpathAngleY = 0;
ToolpathAngleZ = 0;
}
else
{
PowerMILLAutomation.ExecuteEx("ACTIVATE WORKPLANE '" + NCProgWP + "'");
PowerMILLAutomation.ExecuteEx("DIALOGS MESSAGE OFF");
string SizeWP = PowerMILLAutomation.ExecuteEx("SIZE WORKPLANE '" + ToolpathWP + "'");
PowerMILLAutomation.ExecuteEx("DIALOGS MESSAGE ON");
string[] SizeWpSplit = SizeWP.Split(' ');
bool FoundAnglesWorld = false;
bool FoundAnglesTp = false;
ToolpathAngleX = 9999;
ToolpathAngleY = 9999;
ToolpathAngleZ = 9999;
foreach (string Item in SizeWpSplit)
{
if (FoundAnglesTp && ToolpathAngleX == 9999 && Item != "")
{
ToolpathAngleX = double.Parse(Item);
}
else if (FoundAnglesTp && ToolpathAngleY == 9999 && Item != "")
{
ToolpathAngleY = double.Parse(Item);
}
else if (FoundAnglesTp && ToolpathAngleZ == 9999 && Item != "")
{
ToolpathAngleZ = double.Parse(Item);
break;
}
if (Item.IndexOf("Angles:") > 0 && FoundAnglesWorld)
{
FoundAnglesTp = true;
} else if (Item.IndexOf("Angles:") > 0)
{
FoundAnglesWorld = true;
}
}
}
}

 

I do not consider this to be complicated to integrate, but gives an idea how sometime simple things can be quite interesting to integrate.

 

Let me know how that works!

 

Michael



Michael Grenier
Senior Solution Engineer
0 Likes
Message 134 of 151

nathanANTQX
Advocate
Advocate

@michael.grenier4GVTU 

I have Mad respect for you to be able to achieve that! I've taken a read through all the code in the Github repository, and have immense respect for all the hours of coding in the plugin.

 

I appreciate it so much, and I think I can speak for most of the Powermill Community that uses the Plugin, we absolutely  appreciate it every day.

I with there was a way for us to give you a MVP award!

 

Kind Regards Nathan

0 Likes
Message 135 of 151

michael.grenier4GVTU
Autodesk
Autodesk
I’m glad this plugin helps people around! I wrote it as a side project for fun seeing how many requests were coming in for the html setupsheet we were unable to deliver to users. Having it as a plugin opens the door to a lot more flexibility but I’m also aware not everyone can or want to play in the code. That said, I’m always happy to help!!

Thanks for the kind words, it’s greatly appreciated!!

Michael


Michael Grenier
Senior Solution Engineer
0 Likes
Message 136 of 151

nathanANTQX
Advocate
Advocate

Hi @michael.grenier4GVTU 

 

Hope you have been doing well. I hope im not a huge bother with this request, is there a way we can update the file name of the setup sheets automatically from Powermill Plugin side?

 

We have noticed another glitch, if the project has been moved/copied to a new location. The Plugin tries to create a Sheet Named SetupSheet ( even though there is already an older revision in the project folder with the same name.) 

 

Or the other Potential issue we have seen is when we are Posting projects while creating new projects. sometimes Excel says cannot open file as the same name is already open, ( But is a different project entirely)

 

Could we Perhaps Name files With Date_SetupSheet Format. (as this would eliminate a lot of potential name clashes as well as excel being silly)

 

Kind Regards Nathan

0 Likes
Message 137 of 151

jjohnybgood2
Participant
Participant

Hi,

I just ran this excell setup sheet and it outputs the tools but not the NC programs what am I doing wrong?

 

Thank you

0 Likes
Message 138 of 151

jjohnybgood2
Participant
Participant

Hello,

How do I use this Template to output both Tool list and NC programmes on the same setup sheet?

 

Thank you

0 Likes
Message 139 of 151

michael.grenier4GVTU
Autodesk
Autodesk

@jjohnybgood2 and @nathanANTQX , sorry for the slow response Nathan, for some reason I never saw the notification.  I've been looking into these last 2 questions and first of all, to answer Nathan's question yes that is a better idea to use time stamp to call setupsheets so I've done it in that version I'm attaching here.  As far as Jonhy's question, normally all you have to do is to add another tab called "ToolList" and build your temaplte in it.  Unfortunately, when I tested it something was broken in the plugin so I fixed that too in the attached version.  Also joining a samplke setupsheet that does both so you can see.

 

Hope that helps!



Michael Grenier
Senior Solution Engineer
Message 140 of 151

jjohnybgood2
Participant
Participant

@michael.grenier4GVTU

Hi,

So are you saying this latest attached ExcelSetupSheet zip file will output both Tool list and NC programmes and if it does do this which one do I select in the ExcelSetupSheet plugin options window as there are three listed. If not can you add this to it for me please? Thank you

0 Likes