Posted By

laurenceosx on 01/04/10


Tagged

ResolverOne


Versions (?)

Run Resolver One Spreadsheet Py File with same name as bat file


 / Published in: DOS Batch
 

  1. @rem Run Resolver One Spreadsheet Py File with same name as bat file
  2. @rem Laurence Toenjes Monday, January 04, 2010
  3.  
  4. @rem # RunAddNums.py for standalone mode
  5. @rem from resolverlib import RunWorkbook
  6. @rem import sys
  7. @rem wb = RunWorkbook( 'AddNums.rsl', {'param1': eval(sys.argv[1]), 'param2': eval(sys.argv[2]) } )
  8. @rem print wb['Sheet1'].A3
  9.  
  10.  
  11. @IF EXIST "%~dp0resolverlib" (
  12. GOTO :StandAloneMode
  13. )
  14.  
  15. @IF EXIST "%ProgramFiles(x86)%" (
  16. GOTO :ProgFileX86
  17. ) ELSE (
  18. GOTO :ProgFile
  19. )
  20.  
  21. :StandAloneMode
  22. @PUSHD "%~dp0"
  23. @SET r1home=%CD%
  24. @POPD
  25. @SET r1exe=%~dp0resolverlib\RSIronpython.exe
  26. @GOTO :Ready
  27.  
  28. :ProgFileX86
  29. @SET r1home=%ProgramFiles(x86)%\Resolver One
  30. @SET r1exe=%r1home%\bin\RSIronpython.exe
  31. @GOTO :Ready
  32.  
  33. :ProgFile
  34. @SET r1home=%ProgramFiles%\Resolver One
  35. @SET r1exe=%r1home%\bin\RSIronpython.exe
  36. @GOTO :Ready
  37.  
  38. :Ready
  39. "%r1exe%" "%~dpn0.py" %*

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: laurenceosx on January 4, 2010

RunAddNums.py

from resolverlib import RunWorkbook import sys wb = RunWorkbook( 'AddNums.rsl', {'param1': eval(sys.argv[1]), 'param2': eval(sys.argv[1]) } ) print wb['Sheet1'].A3

You need to login to post a comment.