How to find enumerated constant block inside the model using command line?

I am not able to find enumerated constant block using find_system function.When i try to find enumerated constant block using find_system, i get a empty cell array.Can anyone please help me with it.
I am using following command gh=find_system('testmodel','BlockType','Enumerated Constant')
testmodel is the name of my model.

 채택된 답변

Fangjun Jiang
Fangjun Jiang 2016년 3월 17일

0 개 추천

There is no "Enumerated Constant" block type. It is a masked SubSystem block. You need to use:
find_system('testmodel','MaskType','Enumerated Constant')

댓글 수: 3

That was really Helpfull Thank You
can you please tell me what are other "types"present in simulink
There are "Type", "MaskType", "PortRotationType", "IOType", "BlockType", "PaperType", "CompiledPortDataTypes", etc. I don't think there is a fixed set. What you need to know is the block properties. Please search for "Common block properties" in the document to find it out.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

질문:

2016년 3월 17일

편집:

2016년 3월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by