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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. 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
PeterWigren
12-Amethyst
(To:adev-2)

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

Announcements


Top Tags