rebindTargetModel - Change target model - MATLAB (original) (raw)
Main Content
Change target model
Since R2024a
Syntax
Description
rebindTargetModel([allocSet](#mw%5Ff17ab9a6-da38-472e-b5f8-fedb1eb655ef%5Fsep%5Fmw%5F2aa43e21-d9fc-4e02-9769-d431e582562f),[name](#mw%5Fe4d38345-481b-415d-bda7-9158bf5e6e96))
changes the target model to be linked to the model specified by name
. If the new model does not have the same structure, allocations are not preserved.
Examples
Create two new models with one component each.
mSource = systemcomposer.createModel("Source_Model_Allocation"); systemcomposer.openModel("Source_Model_Allocation"); sourceComp = addComponent(get(mSource,"Architecture"),"Source_Component"); mTarget = systemcomposer.createModel("Target_Model_Allocation"); systemcomposer.openModel("Target_Model_Allocation"); targetComp = addComponent(get(mTarget,"Architecture"),"Target_Component");
Create an allocation set named MyNewAllocation
.
allocSet = systemcomposer.allocation.createAllocationSet("MyNewAllocation",... "Source_Model_Allocation","Target_Model_Allocation");
Create a new model. Then, rebind the target model in the allocation set.
mTarget2 = systemcomposer.createModel("archModel"); rebindTargetModel(allocSet,"archModel")
Input Arguments
Name of target model, specified as a character vector or string.
Example: "archModel"
Data Types: char
| string
More About
Version History
Introduced in R2024a
See Also
Tools
Blocks
Objects
- systemcomposer.allocation.Allocation | systemcomposer.allocation.AllocationScenario | systemcomposer.allocation.AllocationSet
Functions
- systemcomposer.allocation.createAllocationSet | systemcomposer.allocation.load | systemcomposer.allocation.open | systemcomposer.allocation.editor | close | systemcomposer.allocation.AllocationSet.closeAll | systemcomposer.allocation.AllocationSet.find | save | rebindSourceModel | synchronizeChanges | createScenario | deleteScenario | getScenario | allocate | deallocate | getAllocation | getAllocatedFrom | getAllocatedTo | destroy