macro help!!

macro help!!

Rui_Ramos
Advocate Advocate
811 Views
3 Replies
Message 1 of 4

macro help!!

Rui_Ramos
Advocate
Advocate

Hello Guys,

Im trying to buiding a macro to update all toolpaths feeds and speeds from tool data,  except those that are already post  processed.

any ideas? can someone help me out please!!

 

thanks in advance..

take care and have a nice day!!

 

RRamos

0 Likes
Accepted solutions (1)
812 Views
3 Replies
Replies (3)
Message 2 of 4

cfastNJWK6
Advisor
Advisor
Accepted solution

This may not be exactly what you are looking for, but it should get you started:

STRING LIST $Tps = extract(folder('toolpath'),'name')

FOREACH $nc IN folder('NCProgram') {
	IF $nc.Status != "not_written" {
		FOREACH $item IN components(entity('ncprogram', $nc.Name)) {
			IF lcase($item.RootType) == 'nctoolpath' {
				IF member($Tps, $item.Name) {
					int a = remove($tps, $item.Name)
					}
				}		
			}
		}
	}

FOREACH $tp IN $Tps {
	ACTIVATE TOOLPATH $tp
	EDIT RPM RESET
	EDIT FRATE RESET
	RESET TOOLPATH FEEDRATE
	}

 

 

0 Likes
Message 3 of 4

Rui_Ramos
Advocate
Advocate

Hello cfastNJWK6

thanks a lot for your help and time.

I will give it a try and see, it looks fine.

My biggest problem was how to not update the posted ones.

 

Take care and have a nice day!!

 

RR

0 Likes
Message 4 of 4

Rui_Ramos
Advocate
Advocate

Hello cfastNJWK6,

It worked nicely!! 

thanks a lot!!

 

have a nice day!!

 

RR