필터 지우기
필터 지우기

Retrieve Source Library Info.

조회 수: 16 (최근 30일)
jishnusekhar
jishnusekhar 2024년 7월 25일 9:47
답변: Karan Singh 2024년 7월 25일 11:34
Is there any to retrieve the 'source library info' of any simulink block inside an already existing simulink model?
This will be useful for validating whether the simulink block belongs to particular Simulink library or not.

답변 (2개)

Dheeraj
Dheeraj 2024년 7월 25일 10:00
Hi jishnusekhar,
You can check the Source Library information of a Simulink block within a Simulink Model by right-clicking on the block and selecting "Help." This action will redirect you to the block's documentation page, where the Source Library information is displayed at the top.
Thank you.
  댓글 수: 1
jishnusekhar
jishnusekhar 2024년 7월 25일 10:39
I don't want to check the help, I want to know the block's source library path within an exisiting model. From which library path the particular block has been pulled from.

댓글을 달려면 로그인하십시오.


Karan Singh
Karan Singh 2024년 7월 25일 11:34
If you are looking for the exact block's source path then you youuse the property of "get_params" for "blocks", I have found one as 'ReferenceBlock', which returns the name of the library block to which this block links.
Here is the code I have followed which you can convert into a matlab script to be an autonomous process-
>> blocks = find_system('untitled1', 'Type', 'Block');
>> block = blocks{1};
>> sourceLibrary = get_param(block, 'ReferenceBlock');
>> sourceLibrary
sourceLibrary =
'hdlsllib/HDL RAMs/HDL FIFO'
And here are is SC of the same

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by