1 Reply Latest reply on Apr 12, 2016 9:45 AM by Patrick.Cashman

    VB .NET exception error when trying to check whether a component is composite or not

    15e6ad19-6d34-8b46-0100-014f0327e866

      Hi All,

       

      The following are the two lines of code that we have used in the past in VB 6.0 to check all design components in Dx-Designer and pass only those which have symbol type as COMPOSITE. There are no issue with this usage in VB 6.0.

       

      But when we use the same code in VB .NET, we see a exception error getting displayed at the second line of the below code.

      Please check and let us know if anything is wrong with this or if there is any other recommended method of checking the symbol type without any exception.

       

      For Each objComp In schApp.DesignComponents("", sTopLevelBlock, "-1", "STD", True)

                  If objComp.SymbolBlock.SymbolType = VDB_COMPOSITE Then

       

      Note:   sTopLevelBlock = gobjProjectData.GetiCDBDesignRootBlock(strDesign) 'Returns Top Level block Name

       

      The exception says 'Unable to Allocate Object Collection'. Enclosed is the snapshot of the same.