IBM Support

HD03303: CAA CAN'T CREATE 3D ANNOTATION IN BATCH MODE.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The CreateTextOnGeometry method in CATITPSFactoryAdvanced needs
    
    CATSO.
    But this CATSO must contain a valid PathElement which is identi
    cal to
    what is obtained by interactive selection.
    I try to get PathElement as follows (omitting error check).
    
      CATSession* pSession = NULL;
      hrc = ::Create_Session(sSessionName, pSession);
      CATIIniInteractiveSession *isession;
      hrc = pSession->QueryInterface(IID_CATIIniInteractiveSession,
    
    (void**)&isession);
      CATIEditor *editor;
      hrc = isession->Open(m_sCATPartFilename1, FALSE, &editor);
      CATFrmEditor* pFrmEditor = editor->GetEditor();
      CATDocument* pDoc = pFrmEditor->GetDocument();
      CATIDocRoots* piDocRootsOnDoc = NULL;
      hrc = pDoc->QueryInterface(IID_CATIDocRoots, (void**)
    &piDocRootsOnDoc);
      CATListValCATBaseUnknown_var* pRootProducts = piDocRootsOnDoc
    -
    >GiveDocRoots();
      CATIProduct_var spRootProduct = (*pRootProducts)■1;
      CATPathElement zUIPathElem(spRootProduct);   // substitute fo
    r
    pFrmEditor->GetUIActiveObject();
    
    And try to create annotations.
    
      CATIGeometricalElement_var spGElement( m_spPart->GetFeatureSo
    lid
    () );
      CATIBRepAccess_var spBRepAccess( CATBRepDecode(spCell,
    spGElement ) );  // spCell is target CATCell to attach annotati
    on
      CATIBRepAccess *pBrepAcess = spBRepAccess;
      CATIBuildPath *pBuildPath = NULL;
      hrc = pBrepAcess->QueryInterface(IID_CATIBuildPath, (void**)
    &pBuildPath);
      CATPathElement *testPathElement = NULL;
      pBuildPath->ExtractPathElement(&zUIPathElem, &testPathElement
    );
      CATSO* pSelection = new CATSO();
      hrc = pSelection->AddElement( testPathElement );
      CATITPSFactoryAdvanced * piFactAdv = NULL;
      hrc = CATTPSInstantiateComponent (DfTPS_ItfTPSFactoryAdvanced
    ,
    (void**) & piFactAdv);
      CATUnicodeString zText("Sample");
      CATITPSText* piText = NULL;
      hrc = piFactAdv->CreateTextOnGeometry( pSelection, NULL, &zTe
    xt,
    &piText );
    
    But CreateTextOnGeometry returns error.
    
    .
    

Local fix

Problem summary

  • CAA can't create 3D annotation in BATCH mode.
    The CreateTextOnGeometry method in CATITPSFactoryAdvanced needs
    
    CATSO.
    But this CATSO must contain a valid PathElement which is identi
    cal to
    what is obtained by interactive selection.
    I try to get PathElement as follows (omitting error check).
    
      CATSession* pSession = NULL;
      hrc = ::Create_Session(sSessionName, pSession);
      CATIIniInteractiveSession *isession;
      hrc = pSession->QueryInterface(IID_CATIIniInteractiveSession,
    
    (void**)&isession);
      CATIEditor *editor;
      hrc = isession->Open(m_sCATPartFilename1, FALSE, &editor);
      CATFrmEditor* pFrmEditor = editor->GetEditor();
      CATDocument* pDoc = pFrmEditor->GetDocument();
      CATIDocRoots* piDocRootsOnDoc = NULL;
      hrc = pDoc->QueryInterface(IID_CATIDocRoots, (void**)
    &piDocRootsOnDoc);
      CATListValCATBaseUnknown_var* pRootProducts = piDocRootsOnDoc
    -
    >GiveDocRoots();
      CATIProduct_var spRootProduct = (*pRootProducts) 1 ;
      CATPathElement zUIPathElem(spRootProduct);   // substitute fo
    r
    pFrmEditor->GetUIActiveObject();
    
    And try to create annotations.
    
      CATIGeometricalElement_var spGElement( m_spPart->GetFeatureSo
    lid
    () );
      CATIBRepAccess_var spBRepAccess( CATBRepDecode(spCell,
    spGElement ) );  // spCell is target CATCell to attach annotati
    on
      CATIBRepAccess *pBrepAcess = spBRepAccess;
      CATIBuildPath *pBuildPath = NULL;
      hrc = pBrepAcess->QueryInterface(IID_CATIBuildPath, (void**)
    &pBuildPath);
      CATPathElement *testPathElement = NULL;
      pBuildPath->ExtractPathElement(&zUIPathElem, &testPathElement
    );
      CATSO* pSelection = new CATSO();
      hrc = pSelection->AddElement( testPathElement );
      CATITPSFactoryAdvanced * piFactAdv = NULL;
      hrc = CATTPSInstantiateComponent (DfTPS_ItfTPSFactoryAdvanced
    ,
    (void**) & piFactAdv);
      CATUnicodeString zText("Sample");
      CATITPSText* piText = NULL;
      hrc = piFactAdv->CreateTextOnGeometry( pSelection, NULL, &zTe
    xt,
    &piText );
    
    But CreateTextOnGeometry returns error.
    
    .
    

Problem conclusion

  • THIS PROBLEM WILL BE FIXED ON CATIA VERSION 5 RELEASE 12 GA lev
    el.
    NOTE THAT THIS PROBLEM WILL ALSO BE FIXED ON V5R9SP09 AND V5R10
    SP07 AND V5R11SP04.
    
    .
    

Temporary fix

Comments

APAR Information

  • APAR number

    HD03303

  • Reported component name

    CATIA V5/NT/200

  • Reported component ID

    569151000

  • Reported release

    509

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2003-01-28

  • Closed date

    2003-06-16

  • Last modified date

    2009-06-24

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    CATIA V5/NT/200

  • Fixed component ID

    569151000

Applicable component levels

  • R509 PSN

       UP

  • R510 PSN

       UP

  • R511 PSN SP51104

       UP03/08/04 N 1000

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSVJ2K","label":"CATIA V5"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"509","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
24 June 2009