Add a drop-down menu in block parameters while creating a custom Simscape block ?
Mostra commenti meno recenti
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
Risposte (1)
Dimitris Iliou
il 21 Apr 2017
0 voti
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?
Categorie
Scopri di più su Creating Custom Components and Libraries in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!