Get position in Simulink browser programmatically, where user has last clicked with mouse cursor, to add block
4 ビュー (過去 30 日間)
古いコメントを表示
Hi all,
if a usere uses copy&paste in Simulink the block is pasted on the position where last clicked inside Simulink browser.
I would like to get/read this information programmatically where user last clicked, so that I can add a block to this exact position.
I've tried to find infos with DAS.Studio (see below code snippet), but couldn't find anything.
Thanks in advance.
BR Thomas
% The following code is a way to access the tabs of the Simulink editor
aStudio = DAS.Studio; % Get a blank studio;
allStudios = aStudio.getAllStudios; %Find all the studios currently open
studios = allStudios{1}.getAllStudiosSortedByMostRecentlyActive;
curTabIdx = studios.getCurrentTab; % Get the index of the current SL editor tab
tab = studios.getComponentsByTab(curTabIdx); % Get current tab
0 件のコメント
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!