How do I change the mask appeareance of a simscape blocks, such as Variable Orifice block?

6 ビュー (過去 30 日間)
liqun fang
liqun fang 2022 年 5 月 3 日
回答済み: Yifeng Tang 2022 年 6 月 22 日
Q1: I want to chage the mask appearance of simscape blocks, sucb as Variable Orifice block shown in the following picture.
So I change some Attribues and Dialog of Parameters in the Parameters&Dialog shown in the following picture, such as Visible.
But the mask appearance not affect at all. Why???
Q2: What is the function of the command shown in the following picture.
simscape.compiler.sli.internal.preinitmask(gcb)???????
  2 件のコメント
Raju
Raju 2022 年 5 月 6 日
Hi Liqun,
Usually all the block mask parameters are completely in control of the developer and there might be internal callbacks which might be overwriting your visibility settings.
Also, what you are seeing in the initialization section is a preinitialize-callback which usually exists for most of the blocks, to control the mask params & may be sometimes license & other checks
Hope this clarifies
Raju.
liqun fang
liqun fang 2022 年 5 月 8 日
Hi Raju
Thank you for your answer.
I try to comment the function in the initialization section with % symbol. The result still is that the mask appearance can't change. So the mask appearance may be completely in control of internal callbacks, such as Variable Orifice block and Constant Source block.

サインインしてコメントする。

回答 (1 件)

Yifeng Tang
Yifeng Tang 2022 年 6 月 22 日
As Raju commented, the icons for library blocks are in control of the developer. In recent versions of Simscape, there is usually a .svg file of the same name as the block .ssc file, in the installation folder, and the .svg file is the icon definition. Changing those is possible, at your own risk, but it'll require changes to your installation folder.
You can always put another mask on though. Since it's your own mask, you can change its appearance whichever way you want. However, you have to do this for every block you want to change.

カテゴリ

Help Center および File ExchangeUpgrading Hydraulic Models to Use Isothermal Liquid Blocks についてさらに検索

製品


リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by