主要内容

partrepo.collection.install

Install collections

Since R2026a

    Description

    partrepo.collection.install(collectionName) installs the MLDATX collection. You can use installed collections in the Block Parameterization Manager tool.

    example

    partrepo.collection.install(___,Name=Value) installs the MLDATX collection using name-value arguments.

    example

    Examples

    collapse all

    This example shows how to install a part collection. The MyResistors_1.0.0.mldatx file is a collection of three resistor parts tha parameterize the Simscape foundation library Resistor block. Use the partrepo.collection.install function to install the collection.

    partrepo.collection.install("MyResistors_1.0.0.mldatx")
    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
    

    You can now access the parts in the Block Parameterization Manager for a Resistor block.

    This example shows how to install a part collection using optional name-value arguments. Overwrite an existing installed collection and display a report when the task is complete.

    The MyResistors_1.0.0.mldatx file is a collection of three parts for the Simscape™ foundation library Resistor block. Use the partrepo.collection.install function to install the collection. To overwrite an existing installed collection of the same name, use the Overwrite option. To suppress the report when the task is complete, use the ShowReport option.

    collectionName = "MyResistors_1.0.0.mldatx";
    partrepo.collection.install(collectionName,Overwrite=true,ShowReport=false)

    Input Arguments

    collapse all

    Name of the part collection to install, specified as a string scalar or character vector.

    Name-Value Arguments

    collapse all

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: partrepo.collection.install(collectionName,Overwrite=true)

    Option to overwrite an existing collection that has the same ID, specified as a logical value. When you specify Overwrite as true, the function overwrites the installed collection with the specified collection of the same collection ID, if it exists.

    Example: partrepo.collection.install(collectionName,Overwrite=true)

    Option to display the installation report in the MATLAB Command Window when the installation completes, specified as a logical value.

    Example: partrepo.collection.install(collectionName,ShowReport=false)

    Version History

    Introduced in R2026a