Add a drop-down menu in block parameters while creating a custom Simscape block ?

3 visualizaciones (últimos 30 días)
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

Respuestas (1)

Dimitris Iliou
Dimitris Iliou el 21 de Abr. de 2017
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:
  1. Right-click on the block
  2. Mask
  3. Edit Mask
  4. Parameters & Dialog
You can find more details on how to modify the mask in the following documentation link:
You can also refer to a previous answer, in regards to the following question:
  • Is it possible to edit the mask properties of a component before using ssc_build to build the library?

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by