Get position in Simulink browser programmatically, where user has last clicked with mouse cursor, to add block
조회 수: 3 (최근 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개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Model Editing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!