Macro Request

anto_joseph4HH2K
Participant
Participant

Macro Request

anto_joseph4HH2K
Participant
Participant

Hi can anyone help me with creating a macro for,

-Mirroring all toolpath in xy for toolpaths in selected folder

-Checking Collison and gauges for selected toolpaths,ideally toolpaths in selected folder.

 

 

0 Likes
Reply
Accepted solutions (1)
313 Views
4 Replies
Replies (4)

TK.421
Advisor
Advisor

https://forums.autodesk.com/t5/powermill-forum/help-mirror-macro/m-p/12444743

 

--------------------------------------
Former Expert Elite Member (not enough participation in all their webinars and other "stuff", even though I beta test and regularly contribute to the betterment of the software and the PowerMill community as a whole)

the numbers never lie
0 Likes

icse
Collaborator
Collaborator
Accepted solution

try this:

string $mirrorWP = ''
if entity_exists('workplane','') {
	$mirrorWP = entity('workplane','').Name
}

entity list $tps = input entity multiple toolpath 'select toolpaths:'

dialogs message off




foreach $tp in $tps {
	activate workplane ${mirrorWP}
	MODE TOOLPATH_TRANSFORM START ${tp.Name}
	EDIT OPTIONS TOOLPATH AUTO_APPEND NO
	MODE TRANSFORM TYPE MIRROR
	MODE TRANSFORM COPY NO
	MODE TRANSFORM MIRROR XY
	MODE TOOLPATH_TRANSFORM FINISH ACCEPT
}

foreach $tp in $tps {

	activate toolpath ${tp.Name}
	EDIT COLLISION TYPE COLLISION
	EDIT COLLISION APPLY
	EDIT COLLISION TYPE GOUGE
	EDIT COLLISION APPLY
	
}

dialogs message on

gosmann.andreas
Advocate
Advocate

@icse 

iam still lerarning macros why are sometimes {} by the string?

like

activate workplane ${mirrorWP}

and not "active workplane $mirrorWP" only?

0 Likes

anto_joseph4HH2K
Participant
Participant

Works absolutely great,Thank you!

0 Likes