The find_mdlrefs function used with new 'MatchFilter' ActiveVariants option doesn't return the same as the 'Variant'
Mostrar comentarios más antiguos
Following the warning :
Warning: 'Variants' will be removed. Instead of using 'Variants' with value set to 'AllVariants', use 'MatchFilter' with value set to '@Simulink.match.allVariants'.
I changed to 'MatchFilter' But the new 'MatchFilter' option, when used with @Simulink.match.activeVariants, doesn't return the same as the 'Variants' option with 'ActiveVariants'.
To test, I used the following code:
models = find_mdlrefs(mainModelName, 'LookUnderMasks','off','MatchFilter', @Simulink.match.activeVariants,'FollowLinks', 'on','IncludeCommented','off');
models1 = find_mdlrefs(mainModelName, 'LookUnderMasks','off','MatchFilter', @Simulink.match.allVariants,'FollowLinks', 'on','IncludeCommented','off');
models2 = find_mdlrefs(mainModelName, 'LookUnderMasks','off','Variants','ActiveVariants','FollowLinks', 'on','IncludeCommented','off');
models3 = find_mdlrefs(mainModelName, 'LookUnderMasks','off','Variants','AllVariants','FollowLinks', 'on','IncludeCommented','off');
length(models)
length(models1)
length(models2)
length(models3)
Which returned:
ans = 95 (MatchFilter/@Simulink.match.activeVariants)
ans = 95 ('MatchFilter/@Simulink.match.allVariants)
ans = 78 ('Variants'/ActiveVariants)
ans = 95 ('Variants'/AllVariants)
I found a bug report on the same subject : https://www.mathworks.com/support/bugreports/2341865#
But the Fix options is to upgrade to R2021b and I am using R2023a so the fix doesn't seem to be working for me
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Programmatic Model Editing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!