While I tried to collect lines in paralel, an error popup:
>> Battery_Array_tmp
Error using Battery_Array_tmp (line 33)
The first port already has a line connection
add_line(mdl,PH_Add_MC_cube{v-1,i}.LConn(2),PH_Add_MC_cube{v,i}.LConn(2),'Autorouting','on');
Can someone assist to solve it?
I adding part of rellevant script:
open_system('Battery_arc_tmp')
battery_model = find_system(mdl,'FindAll','on','Name','Battery_arc_tmp');
Plus_MC = find_system(mdl,'LookUnderMasks','All','FindAll','on','Name','POS');
Minus_MC = find_system(mdl,'LookUnderMasks','All','FindAll','on','Name','NEG');
nl=num2str(v + numRows*(i-1));
Add_MC_cube(v) = add_block('MC_TMP/STRING_MC_Cube 1', [mdl,'/STRING_MC_Cube ',nl]);
Add_MC_cube(v) = add_block('MC_TMP2/STRING_MC_Cube 1', [mdl,'/STRING_MC_Cube ',nl]);
posc = get(Add_MC_cube(v),'Position');
set(Add_MC_cube(v),'Position',posc + [100+(i-1)*colPos 100*(v-1)+45 100+(i-1)*colPos 100*(v-1)+45])
PH_Add_MC_cube{v,i}=get(Add_MC_cube(v),'PortHandles');
add_line(mdl,PH_Add_MC_cube{v-1,i}.LConn(2),PH_Add_MC_cube{v,i}.LConn(2),'Autorouting','on');
while connecting 2 module there is no problem/
But when increase above 2 module i gos an error message (above)..
please, see pic attached...
Thank for assist.
Tommy