Community
PowerMill Forum
Welcome to Autodesk’s PowerMill Forums. Share your knowledge, ask questions, and explore popular PowerMill topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Export Macro

1 REPLY 1
Reply
Message 1 of 2
Ibisu_nert
116 Views, 1 Reply

Export Macro

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

1 REPLY 1
Message 2 of 2
Ibisu_nert
in reply to: Ibisu_nert

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

}

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums