Main Content

partrepo.collection.listDataSets

List parts available in a given collection

Since R2026a

    Description

    partsTable = partrepo.collection.listDataSets(collectionID) lists the parts available in the specified collection.

    example

    Examples

    collapse all

    This example shows how to generate a list of all the parts that belong to an installed collection.

    The MyResistors_1.0.0.mldatx file is a collection with three parts to parameterize the Resistor block in the Simscape foundation library. Install the collection.

    partrepo.collection.install("MyResistors_1.0.0.mldatx",Overwrite=true)
    Successfully installed part collection. Details:
    
       Collection ID: MyOrg.MyResistors 
       Version: 1.0.0 
       
       Data set IDs:
          MyManufacturer|R-0001|Resistor 1
          MyManufacturer|R-0002|Resistor 2
          MyManufacturer|R-0003|Resistor 3 
       
       Blocks with data sets from this collection:
          fl_lib/Electrical/Electrical Elements/Resistor
    

    To list the parts that belong to the collection, use the partrepo.collection.listdDataSets function.

    partsTable = partrepo.collection.listDataSets("MyOrg.MyResistors")
    partsTable=3×2 table
           CollectionId                      PartId              
        ___________________    __________________________________
    
        "MyOrg.MyResistors"    "MyManufacturer|R-0001|Resistor 1"
        "MyOrg.MyResistors"    "MyManufacturer|R-0002|Resistor 2"
        "MyOrg.MyResistors"    "MyManufacturer|R-0003|Resistor 3"
    
    

    Input Arguments

    collapse all

    Collection ID for which to display the part information, specified as a string scalar or character vector.

    Output Arguments

    collapse all

    List of part identifiers contained within the given collection, returned as a table.

    Version History

    Introduced in R2026a