Creating traceability links is not supported for objects in Simulink built-in libraries
Mostra commenti meno recenti
Getting the exception
Error using slreq.createLink
Link creation failed.
Caused by:
Error using slreq.createLink
Creating traceability links is not supported for objects in Simulink built-in libraries
When calling slreq.createLink with a System Composer component object as the first argument, and a struct as the second argument. Also tried using requirement as the second arg, but still getting the exception.
As I understand it, this error is thrown when you try to link library components, but this component is from a newly created System Composer model.
Any idea what might be the issue? Tried this on both R2024b and R2025a.
Edit: An interesting thing I just noticed is that this error does not occur when the model hasn't been saved yet. Only after you save the model does it occur.
3 Commenti
Josh Kahn
il 13 Ott 2025
How are you getting the component object? Does this work for you?
model = systemcomposer.createModel('MyArchModel');
save(model);
component = model.Architecture.addComponent('MyComponent');
requirementSet = slreq.new('MyRequirementSet');
requirement = requirementSet.add(Summary='MyRequirement');
link = slreq.createLink(component, requirement);
Piyush
il 15 Ott 2025
Josh Kahn
il 15 Ott 2025
Ah, glad you got it figured out!
Josh
Risposte (1)
Josh Kahn
il 15 Ott 2025
0 voti
"It was because the slx file was present in the Matlab/bin folder. Loading a model from the Matlab installation directory seems to break the linking, Moving the model elsewhere seems to fix the issue."
Categorie
Scopri di più su System Composer in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!