I know it sounds counter-intuitive but this will not create a new project instead it will set the path to your existing project. May be some bug . . .

So you can safely pass the path to your existing project path and it will set it as your existing project. This works on my machine when I change to an already existing project. It does not create a new one but simply sets an existing one.



On 20/02/2013 4:52 PM, Eric Thivierge wrote:
Well that's the thing, I want to make an already existing project the active project.

--------------------------------------------
Eric Thivierge
http://www.ethivierge.com


On Wed, Feb 20, 2013 at 4:49 PM, Alok <[email protected]> wrote:
Just make sure that the path exists beforehand



-------- Original Message --------
Subject: Re: Setting active project in Python
Date: Wed, 20 Feb 2013 16:46:14 -0500
From: Alok <[email protected]>
To: [email protected]


This should work :
Application.ActiveProject2 = Application.CreateProject( "Path\\To\\My\\Project\\")

On 20/02/2013 4:31 PM, Eric Thivierge wrote:
If I remember correctly, there is no way to get this to work in Python.

Application.ActiveProject2 = "Path\\To\\My\\Project\\"

Is this still true?

Getting this error ins 2012.5:

# ERROR : Traceback (most recent call last):
#   File "<Script Block >", line 11, in <module>
#     xsi.ActiveProject2 = "C:\\Users\\Eric\\Documents\\projects\\ET_Tools"
#   File "C:\Program Files\Autodesk\Softimage 2012.SAP\Application\python\Lib\site-packages\win32comext\axscript\client\pyscript.py", line 153, in __setattr__
#     raise AttributeError, attr
# AttributeError: activeproject2
#  - [line 11]

--------------------------------------------
Eric Thivierge
http://www.ethivierge.com

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2238 / Virus Database: 2639/5618 - Release Date: 02/20/13






No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2238 / Virus Database: 2639/5618 - Release Date: 02/20/13


Reply via email to