[Fix Inport position][Simulink Model]
Show older comments
Hello EveryOne,
I have a problem, please spend on your time to help me.
In matlab simulink, I would like to fix the Inport's position,
Even when I add or remove a Inport block, the previous others Inport's position are not changed.
Thank you in advance.
Answers (1)
Nikhil Kori
on 9 Jul 2020
Edited: Nikhil Kori
on 9 Jul 2020
0 votes
Hi,
To change the position of inport block you are supposed to use get_param and set_param.
block_size = get_param('model_name/block_name','Position');
X = block_size(1,1);
Y = block_size(1,2);
X + Width = size_blk(1,3);
Y + Height = size_blk(1,4);
set_param('model_name/block_name','Position',[X Y X+Width Y+Height]);
for example :-
set_param('vdp/Fcn','Position',[50 100 110 120])
1 Comment
Binh Huynh Thanh
on 11 Jul 2020
Categories
Find more on Programmatic Model Editing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!