Export Macro

Export Macro

Ibisu_nert
Participant Participant
419 Views
2 Replies
Message 1 of 3

Export Macro

Ibisu_nert
Participant
Participant

hello i need a macro that exports all the separate templates with their respective names to a windows folder and that lets me choose that folder

0 Likes
420 Views
2 Replies
Replies (2)
Message 2 of 3

Ibisu_nert
Participant
Participant

PESSOAL CONSEGUI SEGUE PARA QUEM ESTIVER PRECISANDO!!!!

 

// Reset any local variables
reset localvars

// Variables
string $prompt = ""
real $exportTolerence = 0
bool err = 0
//string saveFolder = INPUT "Enter Directory path to Export Models:"
string saveFilePath = ""

// Save original export tolerence
//real originalExportTolerence = $powermill.Export.TriangleTolerance

// SET TO WORLD COORIDATES
DEACTIVATE Workplane

FOREACH mod IN folder('model') {
$prompt = "Export Tolerence for " + $mod.name

// Error checking on export tolerence
DO {
$exportTolerence = 0.01
$err = ERROR $exportTolerence
IF $err {
MESSAGE ERROR "Input not a number! Try again."
}
} WHILE $err == true

// Set tolerence
EDIT PAR Powermill.Export.TriangleTolerance $exportTolerence

// build export file path
$saveFilePath = $mod.name + ".dgk"
DELETE FILE $saveFilePath
EXPORT MODEL $mod.name $saveFilePath

}

0 Likes
Message 3 of 3

nubrandao
Collaborator
Collaborator

solved

0 Likes