Main Content


(Removed) Remove component from view

The removeComponent function has been removed. You can create a view using the createView function with a selection query, remove the query using the removeQuery function keeping the contents, and then remove a component using the removeElement function. For further details, see Compatibility Considerations.



removeComponent(object,compPath) removes the component with the specified path.

removeComponent is a method from the class systemcomposer.view.ViewArchitecture.


collapse all

Create a model, extract its architecture, and add three components.

model = systemcomposer.createModel('mobileRobotAPI');
arch = model.Architecture;
components = addComponent(arch,{'Sensor','Planning','Motion'});

Create a view architecture, a view component, and add a component. Open the architecture views editor to see it.

view = model.createViewArchitecture('NewView');
viewComp = fobSupplierView.createViewComponent('ViewComp');

Remove the component from the view and check the architecture views editor.


Input Arguments

collapse all

View architecture, specified as a systemcomposer.view.ViewArchitecture object.

Path to the component including the name of the top-model, specified as a character vector.

Data Types: char

Compatibility Considerations

expand all

Errors starting in R2021a

Introduced in R2019b