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.


How can I create ports on a template using Properties Mapper?

0 votes
I created a palette, imported images off different switches, and created a Properties Mapper to map these images as templetes for nodes. Then a created a table with the nodes (the switches) and another one with edges (connections among these switches), with "Port switch A" and "Port switch B" as properties.

Now, instead heaving all edges pointing to the center of the node, when I import the information from the table I want these edges connecting the specific ports of each switch using the info in the properties of the edge. So, when importing data from a table and using Properties Mapper, there is a way to automatically:

1. Create ports (points inside a node for connecting edges) in a figure of a specific pallete, each one with their own ID?
2. Can I use the properties of edges to determine which port use in each node?
in Help by

2 Answers

0 votes
Unfortunately, yEd does not support ports as separate entities. Nor is it possible to use yEd's properties mapper to change an edge's source port x, source port y, target port x, or target port y properties.
by [yWorks] (160k points)
0 votes


I've been needing something as you mentioned. I've found this python library [1] that helps in doing what you need. Let me show you a result.

The labels for each node are built based on a Python dictionary, and you identify each port by means of the keywords `src_label` or `trgt_label` such as:

 {'source': 'SW1', 'src_label': 'Gig0/6', 'target': 'R6', 'trgt_label': 'Gig0/11'}

I will give this a try ... looks promising. Hope it helps.


[1] - https://github.com/dmulyalin/N2G

by (420 points)
Legal Disclosure | Privacy Policy