Skip to content

Commit

Permalink
Added APN_activeVariantBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
smiller01985 committed May 13, 2023
1 parent 8a6eb84 commit 48aadfe
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
12 changes: 12 additions & 0 deletions Scripts_Data/APN_activeVariantBlock.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function blk = APN_activeVariantBlock(variant_sub_name)
% Code to return path to block which is the active variant.

% Copyright 2022-2023 The MathWorks, Inc.

vnt_list = get_param(variant_sub_name,'Variants');
vnt_actv = get_param(variant_sub_name,'ActiveVariant');

blk = [];
if(~isempty(vnt_actv))
blk = vnt_list(strcmp(vnt_actv,{vnt_list(:).Name})).BlockName;
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="87d912ba-b409-4856-8a21-c0be1ec34ce6"/>
</Category>
</Info>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info location="APN_activeVariantBlock.m" type="File"/>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="design"/>
<Label UUID="87d912ba-b409-4856-8a21-c0be1ec34ce6"/>
</Category>
</Info>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="design"/>
<Label UUID="87d912ba-b409-4856-8a21-c0be1ec34ce6"/>
</Category>
</Info>

0 comments on commit 48aadfe

Please sign in to comment.