How can I get the variant names inside a Simulink variant subsystem
조회 수: 9 (최근 30일)
이전 댓글 표시
I have a simple variant subsystem in my Simulink model, where I want to get the names of the subsystems inside. In addition it would be nice to read out the Variant control expression, which is assigned to each subsystem as well.
The subsystem is simple in the sense that it only uses a workspace variable to control the active block. I do not use any variant object, nor do I use the variant manager.
댓글 수: 0
채택된 답변
Fangjun Jiang
2020년 9월 14일
If you run find_system(), set the 'Variants' option (use 'AllVariants'). For subsystem inside the variant subsystem, the property is "VariantControl"
댓글 수: 2
Fangjun Jiang
2020년 9월 15일
편집: Fangjun Jiang
2020년 9월 15일
It is the same as find_system(VariantBlock,'SearchDepth',1,'Variants','AllVariants','BlockType','Subsystem') or
find_system(VariantBlock,'Variants','AllVariants','Parent',VariantBlock,'BlockType','Subsystem')
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Component-Based Modeling에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!