Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Open scene using command line

Open scene using command line

bmceqllduebofualxm
Observer Observer
329 Views
0 Replies
Message 1 of 1

Open scene using command line

bmceqllduebofualxm
Observer
Observer

Hello. For our corporate I use a script in 3ds max 2023, which checks if there is a symmetry modifier on the scene in the geometry. This is necessary for some reason every time I open my projects (there are hundreds of them). Our team forgets to run the script after loading the scene, so I decided to move the script to the startup folder, unfortunately the script runs before the whole scene loads, so it doesn't work as it should. Here is an example of a script

 

MySelection=#()
for obj in objects do (for mod in obj.modifiers do (if classof mod == symmetry do (append Myselection obj)))
Select MySelection

 

So I decided to create a batch file that will run my scenes by "dropping" the file onto the batch file, which will run 3ds MAX and execute the script. The batch file looks like this

 

3dsmax -U MAXScript MyScript.ms

This way my 3ds MAX starts but completely empty - this is a new clean 3ds max, not my scene. I know I can give the path for my 3ds max file in a batch file, but I would have to do it hundreds of times because that's how many files I have.

My question is - how do I write batch file so that it can read the path of my scene file and open it?

Have a nice day 🙂

 

0 Likes
330 Views
0 Replies
Replies (0)