Macro Request- export tools as .tls

Macro Request- export tools as .tls

anto_joseph4HH2K
Contributor Contributor
279 Views
1 Reply
Message 1 of 2

Macro Request- export tools as .tls

anto_joseph4HH2K
Contributor
Contributor

Hi guys can anyone help me with a macro that exports all tools used in a project as one single .tls file

0 Likes
280 Views
1 Reply
Reply (1)
Message 2 of 2

nguyenthinhvt95
Advocate
Advocate

Here you go:

STRING $output_directory = 'C:\temp'

// FOREACH tol IN explorer_selected_entities () {
FOREACH tol IN FOLDER('tool') {	
	IF tol.RootType == 'tool' {
		string $hol = $output_directory + '\' + $tol.name + '.stl'
		string $dxf = $output_directory + '\' + $tol.name + '.dxf'

		//$powermill.export.OutputMetricSTL = 0 //for imperial units
		$powermill.export.OutputMetricSTL = 1 //for metric units

		// Define the triangulation tolerance
		$powermill.Export.TriangleTolerance = 0.005

		// Export the active tool as stl
		EDIT TOOL $tol.Name EXPORT_STL TIP SHANK HOLDER $hol		
		IMPORT MODEL $hol

	}
}

Message info "Done"

OLE FILEACTION 'open' $output_directory