Hi all, I have outport block in a subsystem. In outside subsystem, there is block connect with this outport block. I want to get property of that outside block by command line. Do any know?
Kshitij Singh answered .
2025-11-20
blk_lines = get_param('model/subsystem','LineHandles');
Then use the 'DstBlockHandle' property of the outport lines to get the destination block handles. For the full path of these blocks, use 'getfullname' on the handles.
plant_handle = getfullname(get_param(blk_lines.Outport,'DstBlockHandle'));
get_param(plant_handle{1},'ObjectParameters'); % If multiple outports connected to multiple blocks
% get_param(plant_handle,'ObjectParameters'); % If chosen subsystem has only one outport