Main Content

removeComponent

(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, and remove a component using the removeElement function. For further details, see Version History.

Description

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

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

example

Examples

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 Gallery to view the component.

view = model.createViewArchitecture('NewView');
viewComp = fobSupplierView.createViewComponent('ViewComp');
viewComp.Architecture.addComponent('mobileRobotAPI/Motion');
openViews(model);

Remove the component from the view and check the Architecture Views Gallery.

viewComp.Architecture.removeComponent('mobileRobotAPI/Motion');

Input Arguments

collapse all

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

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

Data Types: char

Version History

Introduced in R2019b

collapse all