PowerMill drilling automation\hole tagging plugin

michael.grenier4GVTU
Autodesk
Autodesk

PowerMill drilling automation\hole tagging plugin

michael.grenier4GVTU
Autodesk
Autodesk

Hi Everyone!

 

We’re excited to share the following news… PowerMill Elite users have been asking for a better way to automate their custom drilling processes within PowerMill. Today we’re thrilled to announce a plugin that allows users to tag holes in PowerMill according to a user-defined CSV database. That database can be manually accessed but everything you need to build it also has a interactive UX inside the plugin. Users can now take more custom control of their drilling automation to suit their company’s needs.

 

Please view the teaser video below, to see if this will be of value to you

If you wish to investigate further, install the plugin and put it through its paces. Please go to the following page where you’ll have access to the full length tutorial recording, the sample files, and also a link to download the plugin.

[video]

https://mfghub.autodesk.com/resources/

 

Please note that this plugin was written as a giveaway and that the source code will also be made available soon. This will allow power-users to modify or enhance features to your exact needs.  Please send an email to na_mfg@autodesk.com, once the code is available, and we will make sure you receive instructions for access.



Michael Grenier
Senior Solution Engineer
Reply
Accepted solutions (1)
14,034 Views
119 Replies
Replies (119)

michael.grenier4GVTU
Autodesk
Autodesk

There should be a link at the end of the video that explains how to use it, but just in case here is the installer.  You can also get the source code on the Autodesk PowerMill Github API example page.

 

Michael



Michael Grenier
Senior Solution Engineer

HMC400
Advocate
Advocate

Hi, I played a bit with the plugin, this will come out. Is there any way to solve it? I attach the file.

0 Likes

michael.grenier4GVTU
Autodesk
Autodesk

Yeah I think there was a little bug in there when I made the plugin source code available.  I know a partner told me about it and fixed it.  As I can see, I didn't have time to fix it myself before releasing it!



Michael Grenier
Senior Solution Engineer
0 Likes

HMC400
Advocate
Advocate

I have another question. Why when I go to recognize the holes if I have nothing in the ".csv" file, while when in the ".csv" file do I have any holes stored Powermill crashes?

0 Likes

michael.grenier4GVTU
Autodesk
Autodesk
I'm not sure I understand the question. Do you mean that if the csv file is empty and you try to recognize a hole PowerMill crashes? Is it PowerMill or the plugin that crashes?


Michael Grenier
Senior Solution Engineer
0 Likes

karan30782
Advocate
Advocate

@michael.grenier4GVTU 

Yes ! mine too, when i click on "tag holes" powermill crash with send error report to autodesk.

pls note that I don't have anything written in test file.csv which i created on my desktop.

0 Likes

HMC400
Advocate
Advocate

No exactly the opposite. If the CSV file is empty it works. If Powermill Crash with Autodesk report is compiled

0 Likes

michael.grenier4GVTU
Autodesk
Autodesk
Interesting, are you using the last version I added to this thread few days ago or the original one? Cause I just tried on my side here and I have no issue with an empty csv file...


Michael Grenier
Senior Solution Engineer
0 Likes

HMC400
Advocate
Advocate

I attach Video

0 Likes

michael.grenier4GVTU
Autodesk
Autodesk
Humm, can't reproduce this on my end. Can you open the echo command window at see if there is an error that pops out in there before crashing? I have an idea where it fails but I don't understand why. Also, did you try to change the software language to English for testing? The plugin has to analyse a lot of text data in the background so I'm wondering if the language could be the issue.


Michael Grenier
Senior Solution Engineer
0 Likes

HMC400
Advocate
Advocate

I changed language and opened the echo window on the left to see more. This is what I have.

0 Likes

michael.grenier4GVTU
Autodesk
Autodesk

ok, I may have an idea.  Any chance you can join the test project you have?  I've seen in the past few problems with specific Featuresets so I wonder if that's not what is happening.



Michael Grenier
Senior Solution Engineer
0 Likes

HMC400
Advocate
Advocate

No problem, it's just a trial project

0 Likes

michael.grenier4GVTU
Autodesk
Autodesk

Just tried with your project and have no issue or PowerMill crashes here.  Are you on PowerMill 2021?



Michael Grenier
Senior Solution Engineer
0 Likes

HMC400
Advocate
Advocate

Yes Powermill 2021. Could the problem be related to Microsoft Excel? I am using the 2007 version.

0 Likes

michael.grenier4GVTU
Autodesk
Autodesk
Ok, I don't see how the problem could be with Excel. I'm reading the csv file as a text file in the plugin, not an Excel file so there should be no link between both. I have no idea what is going on to be honest, it would need to be debugged on your personal computer to see what is going on. If you do have knowledge in visual studio, you can access the plugin source code here. Other than that I'm not sure what I can do if I can't reproduce the issue.
https://github.com/Autodesk/powermill-api-examples/tree/master/addin-drilling-automation
Michael


Michael Grenier
Senior Solution Engineer
0 Likes

HMC400
Advocate
Advocate

My knowledge in Visual Studio are very basic but I will try to take a look. Thank you for your time.

0 Likes

HMC400
Advocate
Advocate

Hi, I found the problem. In the Windows geographic area settings I had the comma instead of the dot. I corrected it and everything works. I noticed it by looking at your CSV file. I wanted to ask you one last thing, with the toolpaths I tried and I have no problem, however, the drilling method I can not make it work. From the video I can't understand the explanation of the method because I don't have audio and I don't know English. If you explain how to do it, I would be grateful. thanks for your time.

0 Likes

Sean570
Advocate
Advocate

So I use powerMILL 2015 and I am trying to update the source code for the plugin to work with 2015 and have run into a snag. I got everything to work for the most part, but when I go to tag the holes, it runs the rename.mac, but does not get any further. These lines in particular are the problem:

 

 PowerMILLAutomation.ExecuteEx("STRING PMILLVAR = \"\"");
            PowerMILLAutomation.ExecuteEx("$PMILLVAR = \"extract(components(this), 'diameter')\"");
            string Diameters = PowerMILLAutomation.ExecuteEx("print par \"to_xml(apply(components(entity('featureset', '')), PMILLVAR))\"");
            string[] DiameterList = Regex.Split(Diameters, Environment.NewLine);

            PowerMILLAutomation.ExecuteEx("$PMILLVAR = \"extract(components(this), 'depth')\"");
            string Depths = PowerMILLAutomation.ExecuteEx("print par \"to_xml(apply(components(entity('featureset', '')), PMILLVAR))\"");
            string[] DepthList = Regex.Split(Depths, Environment.NewLine);

            PowerMILLAutomation.ExecuteEx("$PMILLVAR = \"extract(components(this), 'draft')\"");
            string Drafts = PowerMILLAutomation.ExecuteEx("print par \"to_xml(apply(components(entity('featureset', '')), PMILLVAR))\"");
            string[] DraftList = Regex.Split(Drafts, Environment.NewLine);

            PowerMILLAutomation.ExecuteEx("$PMILLVAR = \"extract(components(this), 'colour')\"");
            string Colors = PowerMILLAutomation.ExecuteEx("print par \"to_xml(apply(components(entity('featureset', '')), PMILLVAR))\"");
            string[] ColorList = Regex.Split(Colors, Environment.NewLine);

 

 

If I run the commands in the powermill command window I get an error. I tried running it two different ways:

 

STRING PMILLVAR = ""
$PMILLVAR = "extract(components(this), 'diameter')"

//I got rid of the \ and "" for this one and got an unsupported feature or command error
print par to_xml(apply(components(entity('featureset', '')), PMILLVAR))

//Then I tried this one because why not, and got an invalid arguments error
print par "to_xml(apply(components(entity('featureset', '')), PMILLVAR))"

 


I am wondering if the apply() function isn't compatible with 2015? I don't see it when I look through the reference parameters list. If this is the case, is there a quick solution that achieves the same result but uses different code?


I am just guessing here, so any thoughts would be welcome, thanks.

 

0 Likes

michael.grenier4GVTU
Autodesk
Autodesk

The way methods work in the plugin should be reayly similar to the toolpath way.  All the tagging process is exactly the same.  Where it changes, as you can imagine is when it comes to templates.  If you use methods, you WON'T create subfolder that contains the method, but the method itself will have the name of each tag so you end-up with a template folder that only has template in it.  Now, when you create your methods, make sure you select hole type as the filter type and then select the tag you want to search for cause the plugin only loads the method and calculate it.  I would say that seeing the amount of problem I've had in the past using methods in general, you should think about toolpaths instead, but this is your call.

 

Hope that helps.

 

Michael



Michael Grenier
Senior Solution Engineer
0 Likes