- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hi guys, i have a macro that load model by model from a folder and apply a strategy then reset project and load another one.
but i want to save each model it load, if i have 5 models, i want to apply a strategy in each model but needs to save.
DIALOGS MESSAGE OFF
DIALOGS ERROR OFF
STRING DIR = "C:\TEMP\"
STRING LIST LST = list_files("all", $DIR)
FOREACH line IN LST {
IMPORT MODEL $LINE
FORM BLOCK
EDIT BLOCK RESET
BLOCK ACCEPT
CREATE TOOL ; BALLNOSED FORM TOOL
EDIT TOOL "1" DIAMETER "35"
TOOL ACCEPT
FORM STRATEGYSELECTOR
EDIT PAR "CornerRadius.Active" "0"
EDIT PAR "ResourceAllocation" 70
STRATEGYSELECTOR STRATEGY "Finishing/Raster-Finishing.002.ptf" NEW
IMPORT TEMPLATE ENTITY TOOLPATH TMPLTSELECTORGUI "Finishing/Raster-Finishing.002.ptf"
EDIT TOOLPATH "1" CALCULATE
FORM ACCEPT SFRasterFin
STRING LIST models = {}
FOREACH md IN FOLDER('model') {
IF position($md.name, "Planes") == -1 {
INT k = add_last($models, $md.name)
}
}
STRING PATH0 = "C:\nuno\"
STRING SaveAs = $PATH0 + $modelname
PROJECT SAVE AS $saveas
PROJECT RESET
No
}
Solved! Go to Solution.