Skip to main content
14-Alexandrite
May 30, 2024
Question

how can we get/ fetch the active workspace through customization.

  • May 30, 2024
  • 1 reply
  • 548 views

Version: Windchill 12.1

 

Use Case: I wanted to add some BOM into workspace, iam unable to get the active workspace. I did by hardcoding the workspace oid


Description:

i collated the BOM and i need to get the active workspace, 

I don't know how to get the active workspace, as of now i am hardcoding the workspace oid 

  wt.epm.workspaces.EPMWorkspace workspace = (wt.epm.workspaces.EPMWorkspace) referenceFactory
                .getReference("OR:wt.epm.workspaces.EPMWorkspace:1150900").getObject();
 
i wanted to  dynamically fetch the active workspace instead of hardcoding the workspace OID, i need to retrieve the active workspace for the current user session. 

1 reply

HelesicPetr
22-Sapphire II
22-Sapphire II
May 30, 2024

Hi @AR_9920456 

I am not sure if you can get Active workspace from the server side because active workspace information is part of workgroup manager function.

Yes Creo has also WGM.

If you open Windchill just by explorer can you see active workspace?

 

PetrH