Tools ouside of folder

Tools ouside of folder

jsweatherbie
Advocate Advocate
643 Views
7 Replies
Message 1 of 8

Tools ouside of folder

jsweatherbie
Advocate
Advocate

Hello, I'm trying to figure out how to get tools outside of folder. 

When I program on powermill I "remove from folder" each cutter I use and I'm trying to just gather the ones outside of the folder

 

In this picture you can see my main tooling folder And then the tools outside of it all .

In a macro I'm trying to gather those tools and only those tools. I'm not trying to gather everything in "1600-TOOLING" 

17002693621402451073321653526579.jpg

 

0 Likes
Accepted solutions (1)
644 Views
7 Replies
Replies (7)
Message 2 of 8

icse
Advisor
Advisor
Accepted solution

I'm currently on the go so i could not test it in Powermill...

 

but you could do something like this:

 

entity list $tools = filter(folder('tool'), 'dirname(pathname(this)) == "Tool"')

 

Tested it today, works now 😉

 

Message 3 of 8

jsweatherbie
Advocate
Advocate
Yes sir!
Works as it should.
Normally you get it spot on! Thank you!!!
0 Likes
Message 4 of 8

jsweatherbie
Advocate
Advocate
Is this able to have a diameter sort ?
0 Likes
Message 5 of 8

icse
Advisor
Advisor

try this:

entity list $tools = sort(folder('tool'),'Diameter')
0 Likes
Message 6 of 8

jsweatherbie
Advocate
Advocate

I meant for what you had before like is it able to have a sort added to it like....

entity list $mytools = reverse(sort(filter(folder('tool'), 'dirname(pathname(this)) == "Tool"'), 'diameter'))) 

 

I doubt that actually works but you can see where I'm trying to go lol

0 Likes
Message 7 of 8

icse
Advisor
Advisor

I think you got a ')' to much at the end.

This should work:

 

entity list $mytools = reverse(sort(filter(folder('tool'), 'dirname(pathname(this)) == "Tool"'),'diameter'))

 

 

 

0 Likes
Message 8 of 8

jsweatherbie
Advocate
Advocate
I did haha I have troubles with the modifiers and what goes next
0 Likes