AnsweredAssumed Answered

Error with GetTableNames Method and big assembly

Question asked by Remy Morel on Sep 14, 2015

Hello,

I use GetTablesNames Method to list the tables in assembly.

 

The code :

    Dim SW_Class_Factory As SwDMClassFactory
    Dim SW_Doc_Mgr As SwDMApplication4
    Dim SW_Doc_Type As SwDmDocumentType = SwDmDocumentType.swDmDocumentAssembly
    Dim SW_Document As ISwDMDocument19
    Dim SW_Error As SwDmDocumentOpenError
    Dim SW_Error_Table As SwDmTableError
    Dim SW_Table As ISwDMTable4
    Dim SW_Table_Type As SwDmTableType = SwDmTableType.swDmTableTypeBOMHidden
    Dim Liste_Tables As Array
    SW_Class_Factory = CreateObject("SwDocumentMgr.SwDMClassFactory")
    SW_Doc_Mgr = SW_Class_Factory.GetApplication(SW_License_key)
    SW_Document = SW_Doc_Mgr.GetDocument(Nom_fichier_asm, SW_Doc_Type, True, SW_Error)
    Liste_Tables = SW_Document.GetTableNames(SW_Table_Type)

 

This code works correctly with multiple assemblies.
However, I did multiple tests on large assemblies.

 

Property for assembly :

  • Components : 8504
  • Parts : 7785
  • Subassemblies : 435

 

 

The value remains "Nothing" despite the presence table.
I tested with the type and swDmTableTypeBOMHidden swDmTableTypeBOM.

 

Thank you in advance.

Good day

Outcomes