Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Categories

The "Apply type" context menu command does not work for custom nodes

0 votes

My original intent was to use an Excel Sheet column to define two different node types, and select a different template for each node type.

But yEd does not allow that directly.

So I had to do this workaround:

Step-1: Add an extra label to the nodes,

Step-2: Use the Custom Properties dialog to insert the node type text in that label.

Step-3: Use "Select elements" command to select all nodes where my additional label identifies a particular type of node.

Step-4: Replace the node shape, by right-clicking on a template in the desired palette, and select the Apply type menu option.

yEd carries out the first three steps, but fails at the last step silently: There is no error message. (Note that I was trying to replace with a custom node from my custom palette.)

Then I simly select a node manually, and then used the context menu from my custom palette. This too does not work.

But I tried to select a standard node from a built-in palette (e.g. BPMN), and it worked.

Conclusion: I cannot use "Apply type" context menu command for a customized node.

Also see- https://yed.yworks.com/support/qa/13656/easy-way-to-change-node-shape

Apparently only shape type nodes allow this trick. But I have used the Entity nodes (from the ER diagram palette), and created four customized nodes.

in Feature Requests by (1.4k points)
edited by

1 Answer

0 votes

Re:

My original intent was to use an Excel Sheet column to define two different node types, and select a different template for each node type.

But yEd does not allow that directly.

This has nothing to do with "selecting nodes". You are trying to set the style/visualization of a node depending on the value of a custom property. yEd's property mapper is able to do that - see sub-section "Template Mapping" in section Mapping Custom Properties to Visual Properties in the yEd Manual for documentation.

 

Re:

yEd carries out the first three steps, but fails at the last step silently: There is no error message. (Note that I was trying to replace with a custom node from my custom palette.)

Well, when I try to "Apply Type" with a custom node template in yEd 3.18.1, it works as expected for me. Which version of yEd are you using? Can you upload the palette section with your custom style and the diagram with the node to change, so I can investigate the problem?

by [yWorks] (128k points)
Version 3.18.1
Java Version: 1.8.0_171

The Graphml and xlsx files are attached.
https://drive.google.com/open?id=1BUyjUdbC4GGh8o4O4XXISD0ZV2KM77ZZ

Some background to explain this graph: A large lake in Bangalore is heavily polluted. An expert committee has already given several solutions, but they followed the cause-effect-diagram method (for each root cause, they picked one of the several possible solutions). But the rejuvenation of lake is stuck because in reality this is a wicked problem, and we must capture the needs of all stakeholders and balance them using an IBIS diagram.

So this is the exercise. (When this chart is complete, I plan to send it as a case study to you.)

The excel sheet constructs the graph only partly: It depicts the solutions recommended by the expert committee. After converting it into IBIS diagram, I plan to call all stakeholders and add many more nodes to this chart manually.

During conversion from Excel, I could use only one type of node. But the final chart will have four types of nodes: Questions, Ideas, Pros and Cons. I have inserted a sample node of each type at the right of the chart.

I think you will have to make your own custom palette using these four nodes. After that, try selecting any of the nodes in the graph, and replace it with the Question type node. It does not work in my case.
Legal Disclosure | Privacy Policy
...