3D PLM PPR Hub Open Gateway |
Process Modeler |
Frequently Asked Questions |
Quick Reference |
AbstractHere is a quick-access list of FAQs we have received from CAA partners as well as DS internal developers. Whenever possible in the answers, links to pertinent documents or use cases are provided for more detailed information. How can I retrieve a pointer to the root
activity
of my Process document? |
How can I retrieve a pointer to the root activity of my Process document?
You need to use the CATISPPProcessContainer interface of the DMAPSInterfaces framework. Here is the code to do this:
CATInit *piInitOnDoc = NULL; rc = pProcessDoc -> QueryInterface(IID_CATInit, (void**) &piInitOnDoc); if (FAILED(rc) ) return 5; CATISPPProcessContainer *piProcessCont = (CATISPPProcessContainer*) pInitOnDoc -> GetRootContainer("CATISPPProcessContainer"); if ( NULL == piProcessCont ) return 1; piInitOnDoc -> Release(); piInitOnDoc = NULL; CATLISTV(CATBaseUnknown_var) *pProcessList = piProcessCont->GetAllProcess(); piProcessCont -> Release(); piProcessCont = NULL; ... // root activity is the first of the list of processes. CATISPPActivityRoot_var spActivityRoot = (*pProcessList)[1]; delete pProcessList;
In the above code, you can see that a CATISPPProcessContainer pointer is
first retrieved from the GetRootContainer
method of CATInit
on the Process document. Then, using the GetAllProcess
method of CATISPPProcessContainer,
you can retrieve a list of processes whose first element is the Process
document's root activity. See the "Browsing
a Process Document" use case for more details.
Version: 1 [January 2002] | Document created |
[Top] |
Copyright © 2002, Dassault Systèmes. All rights reserved.