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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Search current WWGM workspace for EPMDocument using C++ Toolkit (WWGMTK)

jlohrberg
4-Participant

Search current WWGM workspace for EPMDocument using C++ Toolkit (WWGMTK)

Hi all, 

 

I am currently developing a C++ toolkit customization for Workgroup Manager and I am using the workspace viewer (wwgmtkWorkspaceViewer_ptr) function getWorkspaceObjectByEpmName() to search for a specific EPM Document by its filename. From my initial testing, it appears that the getWorkspaceObjectByEpmName() function searches the current local workspace as intended, but also the Windchill commonspace which is not desired. Can anyone confirm this functionality and educate me on how to prevent searching commonspace?

 

If searching the Windchill commonspace is by design and there is not a workaround, does anyone know how to determine if the returned workspace object (wwgmtkWorkspaceObject_ptr or wwgmtkEpmDocument_ptr) was located in the local workspace or commonspace?

2 REPLIES 2
jlohrberg
4-Participant
(To:jlohrberg)

I haven't been able to answer my original questions yet, but as a potential workaround, I am using the getWLDPath() function from the wwgmtkWorkspace_ptr object to determine the local folder location of the workspace. Next, I concatenate the folder location with the EPM document file name and check to see if the actual file exists in the workspace (i.e. "%USERPROFILE%\Documents\PTC Places\Workspace\ABC123.SLDDRW")

Worth to mention for wwgmtkWorkspace::getWLDPath():

 

Get path of Workspace Local Directory for the given application
Parameters:
appName
Authoring application name

 

appName can be NULL (at least in my tests with Windchill & WWGM 11.0 M030).

I struggled figuring out the authoring application name - trying some variants of AutoDesk Inventor.... 😬

Announcements


Top Tags