Add a drop-down menu in block parameters while creating a custom Simscape block ?
Show older comments
Hello everyone,
I'm currently creating some custom blocks on Simscape, and I was wondering if it is possible to have a drop-down menu in the plock parameters ? As an example, the Hydraulic Piston Chamber with the parameter "Chamber orientation". Any ideas, or it is not allowed for users, as I expected ?
Thanks in advance
Answers (1)
Dimitris Iliou
on 21 Apr 2017
0 votes
In order to add a drop-down menu in the block parameters, you will need to add a mask to the custom Simscape block you are creating.
Once the Simscape library block is created using ssc_build, it should be locked. You can simply unlock it by clicking on the lock button on the bottom left of the Simulink pane.
Once you have the library block unlocked, you can edit the mask in the following location:
- Right-click on the block
- Mask
- Edit Mask
- Parameters & Dialog
You can find more details on how to modify the mask in the following documentation link:
- Is it possible to edit the mask properties of a component before using ssc_build to build the library?
Categories
Find more on Creating Custom Components and Libraries in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!