How to change the label of independent variables in CMSCOPE

Hello all,

I’m wondering how to customize the labels of independent variables in CMSCOPE to reflect actual value type. For instance in the case of cmscope example from the documentation below


how to change Y for the 3 subplots ?
Thank you,

David

Hello,

There was a similar question two weeks ago (Is it possible to add label to CSCOPXY block?). In the topic you will find how to recover the CMSCOPE figure handle. Once you have it you will be able to access the subplot Axes entities and change the labels.

S.

There is no UI-only way to edit the labels through the GUI. The escape is to define your own graphic figure and use it with the “Name of the scope” parameter.

Could you post a bug to improve the current situation for the scopes? IMHO better label management can be implemented : something where port labels can be edited in the UI and used in the cmscope simulation function.

Y label could also inherit link legend, e.g.:


However, adding a legend on a link (right click/Format/Edit) seems to fail very often (the dialog box does not open), e.g. for the CMSCOPE exampe, I am unable to add a legend on any of the links entering the scope block, there is a Java error that can be seen on the command line:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "com.mxgraph.util.mxPoint.getX()" because "<local8>" is null
	at org.scilab.modules.xcos.graph.XcosDiagram.createCellIdentifier(Unknown Source)
	at org.scilab.modules.xcos.graph.XcosDiagram.getOrCreateCellIdentifier(Unknown Source)
	at org.scilab.modules.xcos.actions.EditFormatAction.createDialog(Unknown Source)
	at org.scilab.modules.xcos.actions.EditFormatAction.showDialog(Unknown Source)
	at org.scilab.modules.xcos.actions.EditFormatAction.actionPerformed(Unknown Source)
...

S.

1 Like

I experienced similar behaviour as Stephane reported above, Scilab 2025.0.0 WIN10-64 , I was even not able at all to edit the link between current or voltage measurement modelica blocks and the CMSCOPE block.

David

I created an issue: Cannot always add legend for Xcos links (#17439) · Issues · scilab / scilab · GitLab

1 Like

hello, as suggested I just filed an issue Enabling labelling of independent variables in SCOPE block type (#17440) · Issues · scilab / scilab · GitLab .
thank you

David

1 Like