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

Accessing Windchill workspaces

Level 7

Accessing Windchill workspaces

I'm trying to figure out how to access an activeWindchill workspace using web/link. I'm trying to write a web page that allows the users to change the value of an internal Pro/E parameter without having to load everything into session first.

 

I've written web/link pages that access files in session and from the local filesystem, so I understand the basics of getting a session object, using methods, etc. I'm finding that the Windchill section of the API documents is just a bit to vague for my feeble mind.

 

Can anyone illustrate how one would set up access with some sample code? I'm sure it's simple, I just haven't figured it out yet. The assumption is that Pro/E is running interactively with an active session tied to the workspace, so I believe don't need to know how to set up server connections, etc.

 

Thanks in advance for any help

4 REPLIES 4

RE: Accessing Windchill workspaces

You can't change parameters without load the file in session first. You don't need to show the part or assembly to the user, but u must load it to a sessino to change a parameter.


You can load the file from active Workspace (Hope thats right I only get the same actions in JLink) :


var descr = ModelDescriptor.CreateFromFileName("filename");
var mdlInSession = session.RetrieveModel(descr);


The filename must be given without a path or everything else. Only the name. So Creo/pro can find it on the actual Windchill Server above searchpath.



Regards,


Eike

RE: Accessing Windchill workspaces

I wasn't clear enough in my explanation: I want to be able to scan the workspace and list the files in it. From that list, I want to select certain files, load them into session and them perform some actions, such as changing parameter values.


I know how to act on the files in session: I just want to be able to list the files in the active Workspace, and that's where I'm not getting it.

Accessing Windchill workspaces

I think nitrocell can do this...



On May 31, 2011, at 8:31 AM, Andrew Mansfield <->
wrote:

I wasn't clear enough in my explanation: I want to be able to scan the
workspace and list the files in it. From that list, I want to select certain
files, load them into session and them perform some actions, such as
changing parameter values.

I know how to act on the files in session: I just want to be able to list
the files in the active Workspace, and that's where I'm not getting it.

-----End Original Message-----

RE: Accessing Windchill workspaces

In JLink I use:


stringseq files = proSession.ListFiles(filter, FileListOpt.FILE_LIST_LATEST_INST, "wtws://" + server.GetAlias() + "/" + workSpaceName + "/");


to get a list of files in the workspace. Not sure if weblink allows the same functionality or not.