Get position in Simulink browser programmatically, where user has last clicked with mouse cursor, to add block
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Interactive Model Editing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!