Message 1 of 10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am working on a macro that exports a model from a list to my project directory.
1 problem I have is it does not export the model I selected from the list.
ENTITY LIST $Selected_Model = INPUT ENTITY MULTIPLE MODEL "Select Models For Export"
FOREACH Mod IN $Selected_Model {
STRING projName = project_pathname (0)
STRING $savePath = $projName + ".dgk"
IF dir_exists ($savePath) {
MESSAGE WARN "Project with this path already exists" + crlf + $savePath
RETURN
}
STRING $com = "EXPORT MODEL $Selected_Model FILESAVE '" + $savePath + "'"
DOCOMMAND $com
If I replace line 10 with
STRING $com = "EXPORT MODEL ALL FILESAVE '" + $savePath + "'" it works but it does every model I have in the project. What do I need to get the selected model from the list?
Problem #2 is when it does export all the models it uses my Powermill project name as the model name. I would like it to use the actual model name listed inside Powermill.
Intel Core i9 13900KF CPU
128 GB Kingston Beast DDR4 SDRAM
PNY RTX A2000 6GB Video Card
WD 1 TB SSD Hard Drive
Windows 11 Pro
Solved! Go to Solution.