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: 

PowerMill drilling automation\hole tagging plugin

119 REPLIES 119
SOLVED
Reply
Message 1 of 120
michael.grenier4GVTU
14033 Views, 119 Replies

PowerMill drilling automation\hole tagging plugin

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
119 REPLIES 119
Message 41 of 120

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
Message 42 of 120

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

Message 43 of 120

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
Message 44 of 120

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?

Message 45 of 120

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
Message 46 of 120

@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.

Message 47 of 120

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

Message 48 of 120

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
Message 49 of 120

I attach Video

Message 50 of 120

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
Message 51 of 120

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

Message 52 of 120

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
Message 53 of 120

No problem, it's just a trial project

Message 54 of 120

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



Michael Grenier
Senior Solution Engineer
Message 55 of 120

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

Message 56 of 120

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
Message 57 of 120

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

Message 58 of 120

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.

Message 59 of 120

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.

 

Message 60 of 120

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

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

Post to forums  

Autodesk Design & Make Report