I was wondering if you could get a handle from a line and draw a line from that to something else. Kaustubha helped me with the code below:
pc = get_param(outPorts{i}, 'PortConnectivity'); srcBlk = get_param(pc.SrcBlock, 'Name'); srcParent = get_param(pc.SrcBlock, 'Parent') add_line(srcParent, [srcBlk '/1'], 'Out2/1', 'autorouting', 'on');
but if you have a sub system with 6 outports and you want to tie a line from each of them, the code above gets the previous block (subsystem) and ties a line from there to a new block. But it always ties a line from the first output, when I want one from each. So I if it’s possible to get a handle to a line, if you could use it as the source parameter in add_line.
Best Answer