- Posts: 763
- Thank you received: 124
×
Modelio 4.0.0 released (07 Nov 2019)
Modelio 4.0.0 has been released ( www.modelio.org/forum/4-announcements/45...-4-0-0-released.html )
Property Pages
7 years 8 months ago #3478 by ebr
Hi ua,
The following code should help you
This piece of code sets the value of the Representation mode to "Image".
Regards,
EBR
The following code should help you
List<IDiagramGraphic> graph = representation.unmask(port, rect.x, rect.y);
if ((graph != null) && (graph.size() > 0) && (graph.get(0) instanceof IDiagramNode)){
IDiagramNode dnode = (IDiagramNode)graph.get(0);
dnode.setProperty("REPMODE", "IMAGE");
}
This piece of code sets the value of the Representation mode to "Image".
Regards,
EBR
The following user(s) said Thank You: ua138
Please Log in or Create an account to join the conversation.
7 years 8 months ago #3479 by ua138
I have just tried your code and it works fine.
Thank you very much for all your support, and the quick answers!!!
Thank you very much for all your support, and the quick answers!!!
Please Log in or Create an account to join the conversation.
7 years 8 months ago - 7 years 8 months ago #3481 by ua138
It is not working though for creating an element from a command. Is there any way of enabling this when you create an element from a command? (Right button and selecting it in the tree view of the model).
Besides, would it be possible to share some of the most relevant property names?
For example, when you use the code:
sharing a list that is similar to:
Representation mode: REPMODE
Fill mode: FILL_MODE
Fill color: FILL_COLOR
Line color: LINE_COLOR
...
...
which are the codes used for acessing these properties?
Thank you very much again for your time.
Besides, would it be possible to share some of the most relevant property names?
For example, when you use the code:
dnode.setProperty("REPMODE", "IMAGE");
sharing a list that is similar to:
Representation mode: REPMODE
Fill mode: FILL_MODE
Fill color: FILL_COLOR
Line color: LINE_COLOR
...
...
which are the codes used for acessing these properties?
Thank you very much again for your time.
Last Edit: 7 years 8 months ago by ua138.
Please Log in or Create an account to join the conversation.
7 years 8 months ago #3493 by ua138
I have managed to solve it as follows:
The rest of types can be taken from the MetaKey.java class here attached.
Thank you for your response.
if ((graph != null) && (graph.size() > 0) && (graph.get(0) instanceof IDiagramNode)){
IDiagramNode dnode = (IDiagramNode)graph.get(0);
dnode.setProperty("FILLCOLOR", "117,36,155"); //The numbers are RGB colors
dnode.setProperty("FILLMODE", "SOLID");
dnode.setProperty("LINECOLOR", "0,28,155");
}
The rest of types can be taken from the MetaKey.java class here attached.
Thank you for your response.
Please Log in or Create an account to join the conversation.
7 years 8 months ago #3494 by ua138
But still, I am wondering how can be a stereotype customized not only for tools but for commands. I see when I create a block into the sysml module from the command, it still keeps the rounded shape. How is this done?
Thank you very much again
Thank you very much again
Please Log in or Create an account to join the conversation.
Time to create page: 0.047 seconds