As Luc-Eric said you can call the setenv anywhere in your bat file, but if you 
want to do it all in one line try this:


call "C:\Program Files\Autodesk\Softimage 2013 SP1\Application\bin\setenv.bat" 
& start /min cmd /c "%XSI_BINDIR%\xsi.bat -w 
\\path\to\workgroup1,\\path\to\workgroup2"

This kind of command "joining" can be especially useful if executing system 
commands from Perl

--
Joey Ponthieux
LaRC Information Technology Enhanced Services (LITES)
Mymic Technical Services
NASA Langley Research Center
__________________________________________________
Opinions stated here-in are strictly those of the author and do not
represent the opinions of NASA or any other party.

From: [email protected] 
[mailto:[email protected]] On Behalf Of Gene Crucean
Sent: Friday, April 26, 2013 3:15 PM
To: [email protected]
Subject: Setting workgroups via batch file

Hey guys,

So I'm trying to set some environment variables via a batch script but this 
page 
(http://softimage.wiki.softimage.com/xsidocs/EnvVars_EnvironmentVariableReference.htm)
 doesn't have a workgroup variable to set.

I stumbled upon Stephens blog 
(http://xsisupport.com/2011/11/09/setting-workgroups-at-startup/) which 
references a data_management.workgroup_appl_path variable but then I'm forced 
to use the SI command prompt and to be honest I'm not even sure how to call 
that thing from within a bat file since call "C:\Program 
Files\Autodesk\Softimage 2013 SP1\Application\bin\SIShell.bat" doesn't seem to 
work.

I've tried this which works...

echo 
\\path\to\proj\pipeline\extensions\softimage2013\workgroups\Arnold<file:///\\path\to\proj\pipeline\extensions\softimage2013\workgroups\Arnold>
 > "C:\Users\%USERNAME%\Autodesk\Softimage_2013_SP1\Data\workgroups.wkg"
echo 
\\path\to\proj\pipeline\extensions\softimage2013\workgroups\RGH<file:///\\path\to\proj\pipeline\extensions\softimage2013\workgroups\RGH>
 >> "C:\Users\%USERNAME%\Autodesk\Softimage_2013_SP1\Data\workgroups.wkg"
echo 
\\path\to\proj\pipeline\extensions\softimage2013\workgroups\3rdParty<file:///\\path\to\proj\pipeline\extensions\softimage2013\workgroups\3rdParty>
 >> "C:\Users\%USERNAME%\Autodesk\Softimage_2013_SP1\Data\workgroups.wkg"

The problem I have is that if we ever change the workgroup paths, on next 
launch, Soft holds onto those old paths with Kung-Fu Grip even though the paths 
in the .wkg file are set properly.

I can't stand many things in Maya but this is one area it's clearly ahead of 
Soft.

set MAYA_MODULE_PATH=\\path\to\proj\pipeline\extensions\maya2013_5\modules <-- 
done deal

Btw, I know about xsi -w option but I'm not sure how that would work with a 
.bat file. My setup is like this...

File one:
call \\path\to\setEnvVars.bat<file:///\\path\to\setEnvVars.bat>
start /min cmd /c "C:\Program Files\Autodesk\Softimage 2013 
SP1\Application\bin\XSI.bat"

File two:
Sets all envvars.

File one calls the file that contains the envvars, those get set, then it 
launches Soft. If I was to use the -w flag, it would have to go on the end of 
the second line in the first file and not in the envvar's file.

So basically, the second line of file one would be something like this:
start /min cmd /c "C:\Program Files\Autodesk\Softimage 2013 
SP1\Application\bin\XSI.bat -w 
\\path\to\workgroup1,\\path\to\workgroup2<file:///\\path\to\workgroup1,\path\to\workgroup2>"



Will someone that understands this setup please shed some light on this little 
golden nugget of my day?



--
-Gene

Reply via email to