%This function will change the status DURING runtime, and will work on %connected targets. It also works in design mode if you simply want to %change the state of a module type and save the design. GSYS = get_gsys('AutoAmp_Example.awd'); %Put awdname or instance number here GSYS.SYS = lookfor_module(GSYS.SYS, 'Sink', 'muted'); %lookfor_module(awe_sys_structure_goes_here, class_type_goes_here, status_set_type_here) set_gsys(GSYS, 'AutoAmp_Example.awd'); %after finding/muting modules, send changes back into the .awd function SYS = lookfor_module(SYS, CLASSNAME, MODE) for i=1:length(SYS.module) %poll design for list of modules M = SYS.module{i}; fprintf(1, '%s [%s]\n', M.hierarchyName, M.className); if (isa(M, 'awe_subsystem')) %Check for subsystem to do recursive status set M = lookfor_module(M, CLASSNAME, MODE); else if strcmp(M.className, CLASSNAME)%If CLASSNAME is a match, perform MODE action. fprintf(1, '********* Set module to mute: %s\n', M.hierarchyName); M = awe_setstatus(M, MODE); end end SYS.module{i} = M; %Recursive handoff end end