User Defined Settings Input Macro Help

User Defined Settings Input Macro Help

Beta_Librae
Advocate Advocate
432 Views
2 Replies
Message 1 of 3

User Defined Settings Input Macro Help

Beta_Librae
Advocate
Advocate

Good Day Everybody,

 

I'm hopeful that someone can point me in the right direction with this one. 

I have a quill extension built into my machine post. The distance it extends is controlled by a user defined setting in the toolpath.

I can't get passed line 6 in the debugger. It's actually erroring out the debugger. 

 

STRING LIST Toolpaths = INPUT ENTITY MULTIPLE TOOLPATH "Select Toolpaths to Modify"
DIALOGS MESSAGE OFF
FOREACH $ENTITY IN $Toolpaths {
                  ACTIVATE TOOLPATH $ENTITY
                  EDIT USERPAR toolpath_strategy NAME "Waxis"
                  EDIT USERPAR toolpath_strategy TYPE 'Real'
                  CREATE USERPAR toolpath_strategy
                  EDIT USERPAR toolpath_strategy "Waxis" '15'
}
DIALOGS MESSAGE ON
PROJECT SAVE 

 

Any help would be greatly appreciated.


Kind Regards,
Not cnc, you can call me Peabrain
0 Likes
Accepted solutions (1)
433 Views
2 Replies
Replies (2)
Message 2 of 3

icse
Advisor
Advisor
Accepted solution

try this:

entity list $tps = input entity multiple toolpath 'Select:'

foreach $tp in $tps {

	activate toolpath ${tp.Name}
	
	if not member($tp.Userparameters._keys,'Waxis') {
		EDIT USERPAR toolpath_strategy  $tp.Name  TYPE 'Real'
		CREATE USERPAR toolpath_strategy $tp.Name "Waxis"
	}
	
	edit par "entity('toolpath','').Userparameters.Waxis" '15'
}
Message 3 of 3

Beta_Librae
Advocate
Advocate

Thank you kindly sir!!

 

Works like a peach. I greatly appreciate your time and effort.


Kind Regards,
Not cnc, you can call me Peabrain
0 Likes