Run MAXScript via CMD help...

Run MAXScript via CMD help...

Dan.woodcock
Participant Participant
800 Views
1 Reply
Message 1 of 2

Run MAXScript via CMD help...

Dan.woodcock
Participant
Participant

Hi all,

 

I am new to this forum (and MaxScript) but I couldn't find the answer by doing a search.

 

Basically, I am trying to launch 3ds max and run a .ms file via CMD. Pretty simple stuff I thought, I have followed the link below...

 

https://knowledge.autodesk.com/support/3ds-max/learn-explore/caas/CloudHelp/cloudhelp/2017/ENU/3DSMa...

 

However, I am trying to run the .ms file from a location on my PC but this fails. This is what I have written so far in the CMD...

 

C:\Users\daniel>cd C:\\Program Files\\Autodesk\\3ds Max 2017
C:\Program Files\Autodesk\3ds Max 2017>3dsmax -U MAXScript C:\Users\daniel\Desktop\Dyn\Test FBX\TestMaxScript.ms

The purpose of this is part of a workflow where I need to open a new max file, run a script that imports FBX, saves and closes. Is there a trick I am missing though?

 

Any feedback would be much appreciated.

 

EDIT:

it works if i put the script in the 3dsmax Directory "C:\Program Files\Autodesk\3ds Max 2017" but I am programmatically creating the MAZ scripts from another software and this folder needs admin rights to save in (which will not be granted on users workstations)

 

Cheers,

Dan

0 Likes
Accepted solutions (1)
801 Views
1 Reply
Reply (1)
Message 2 of 2

Dan.woodcock
Participant
Participant
Accepted solution

Ah, silly mistake. Realised my path had spaces and I hadn't handled those before writing to the CMD. Smiley Embarassed

0 Likes