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 Model File Save

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
john_lute
497 Views, 2 Replies

Export Model File Save

Here is and example of my code.

In order for this macro to work, I have to include a macro pause "" after

EXPORT MODEL $MODEL FILESAVE
$modelexp

 

If I block out the Macro pause as shown in the example it errors out.

 

 

 

//////////// Explorer Stuff///////////////////////
// Removes selected items from explorer variable
EXPLORER SELECT Model ROOT

Macro Pause "Select Desired Models"

IF is_empty(explorer_selected_entities()) {

Macro Pause "Make sure to select your Models"

}

// Loops Through Models
FOREACH MODEL IN explorer_selected_entities() {


FORM MODELTRANS EDIT MODEL $MODEL INTERACTIVE
TRANSFORM TYPE WORLD TRANSFORM MODEL $MODEL



// Example of code from macro record
//EXPORT MODEL "433204_DT03_EJECTOR_INSERT" FILESAVE
//"C:\cnc\5.5\WP_Macros\test.stl"

// Model save path
string modelexp = "C:\cnc\5.5\WP_Macros\" + $model.name

DELETE FILE $modelexp

EXPORT MODEL $MODEL FILESAVE
$modelexp

//macro pause ""


TRANSFORM TYPE WORKPLANE TRANSFORM MODEL $MODEL

}

2 REPLIES 2
Message 2 of 3
rafael.sansao
in reply to: john_lute

Replace:

// Model save path
string modelexp = "C:\cnc\5.5\WP_Macros\" + $model.name
DELETE FILE $modelexp
EXPORT MODEL $MODEL FILESAVE
$modelexp

 

By:

// Model save path
string modelexp = "C:\cnc\5.5\WP_Macros\" + $model.name + ".stl"
DELETE FILE $modelexp
EXPORT MODEL $MODEL $modelexp

Rafael Sansão

EESignature

Message 3 of 3
john_lute
in reply to: john_lute

Thanks for you help!

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

Post to forums  

Autodesk Design & Make Report