cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

How to create Workspace using API

adev-2
4-Participant

How to create Workspace using API

Hi Friends,

I am trying to create a Workspace in ProjectLink but using the follwing API but when I execute it throws me the error :

Error:

INFO  : wt.system.err Administrator - (wt.inf.container.containerResource/26) wt.inf.container.ClassicContainerNotFoundException: Context not found: "Windchill PDM"

Code:

WTPart part = getPart("xxxxxxx");

EPMWorkspace workspace = wt.epm.workspaces.EPMWorkspace.newEPMWorkspace("NewWorkSpace", SessionHelper.getPrincipal(),FolderHelper.getFolder(part) , WTPartConfigSpec.newWTPartConfigSpec(),EPMDocConfigSpec.newEPMDocConfigSpec() );

PersistenceHelper.manager.save( workspace );

can anyone help me how I can achieve this

1 REPLY 1

Hello!

Maybe this will work?

EPMWorkspace.newEPMWorkspace(name, user, null, WTPartConfigSpec.newWTPartConfigSpec(), configSpec, container);

where

EPMDocConfigSpec configSpec is your configspec and WTContainer container is your project

And also remove the line

PersistenceHelper.manager.save( workspace );

Best regards,

Peter

Top Tags