how to avoid conflicts in Goto and From tags when copying a block and automatically updating tag names
2 views (last 30 days)
Show older comments
I developed a subsystem block and adding it to a virtual node connector. When copying the block I want all corresponding tags to be updated with new one. I wrote this code in initialization tab of mask parameter
h=gcbh;
nn=get(h,'Name');
nnn=nn(3:end);
hQr=find_system(h,'LookUnderMasks','All','Name','From');
hQm=find_system(h,'LookUnderMasks','All','Name','Goto');
hcap=find_system(h,'LookUnderMasks','All','Name','Goto');
set(hQr,'GotoTag',['Qr',nnn]);
set(hQm,'GotoTag',['Qm',nnn]);
set(hcap,'GotoTag',['cap',nnn]);
there is one input from tag and two Goto tag but I am unable to get these tags updated in new copied block. Any suggestion??
thanks
0 Comments
Answers (0)
See Also
Categories
Find more on Subsystems in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!