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

yEd Request for Changing Default Node Size for Excel Import

0 votes

yEd Request for Changing Default Node Size for Excel Import

Here is an image of the existing Import Result.

I can generate multiple lines of a fixed width. I just need to now the Control Sequence yEd understands to make the New Line.

I tried CHAR(10) for the example. tried <b/> too :(

in Help by (260 points)

1 Answer

0 votes

The diagram depicted in your image is the result of you turning on "Fit Size to Label" in section "Nodes" on tab "Presentation" in the Excel Import settings. Simply turn off "Fit Size to Label" and the created nodes will all have the size of the chosen node template.

This is the second time that you mention "CHAR(10)" without explaining where you use that directive. Let me restate that there is no feature in yEd that uses that directive.

Regarding <b/>, HTML formatting is not supported by yEd's "Cropping" label configuration. And if you use the "Standard" configuration, your label text has to start with "<html>" to be interpreted as HTML formatted text.

by [yWorks] (137k points)
I use CHAR(10) in Excel to prepare the Input. I do prepare the Multiline Text correctly in Excel. Now, I just need to make the Default Node Size Correctly.

I resized some of the nodes to keep all the Text inside the Node Box and then using your Layout > Edgefit tEdgeo size gives me the right width. Just that the Hight is wrong.

Here's a link to a file that shows the need for the different Height: https://www.dropbox.com/s/7ig351n9f1v1p0v/yEd%20Import%20Node%20hieght%20challenge.png?dl=0

My Belief is that even if the Height is too Big for many Items, the Edges will be correct AND the diagram will look better than this one: https://www.dropbox.com/s/oazreh7zzecbgg1/yEd%20Import%20Node%20hieght%20challenge%20FULL.png?dl=0

Example =
MID(K41,200,53)
&CHAR(10)&MID(K41,254,34)
&CHAR(10)&MID(K41,289,56)
&CHAR(10)&MID(K41,345,49)
&" …"

which produces
"The formal representations used in this International
Standard are indented and numbered
with a full stop (period) (.) for generic relations and
numbered with a dash (-) for partitive relations, …"
for the Text to be displayed in the Node.

I resized some Nodes to get al the Text inside the Node Box and then, tried your Layout > Edge routing > Orthogonal Idea. But it does NOT Reposition the Nodes.

So, I do need to Start with the Correct Size Node Box!

Thank you very much for the additional information and the new sample images. I think I do understand your use case much better now.

Let me restate your use case in my words:
You have a spreadsheet where some cells contain long lines of text. When you import your spreadsheet into yEd, you do not want extremely wide nodes, though.

There are two way to achieve this:

  1. Enter manual line breaks in your text cells and activate Excel import setting 'Fit Size to Label'.
  2. Do not add line breaks to your text cells and use automatic text wrapping in yEd.

The first approach is the one you used for the new sample images ("CHAR(10)" is the line break character). You did not get the desired node height, because of a pitfall of 'Fit Size to Label': This setting means "use 'Tools' -> 'Fit Node to Label' to set the size for the created nodes" and by default 'Fit Node to Label' will only change the width of a node. To change this behavior, open 'Tools' -> 'Fit Node to Label' prior to importing your spreadsheet and make sure 'Ignore Width' and 'Ignore Height' in the 'Fit Node to Label' settings are both turned off.

The second approach requires more preparation.

  1. Decide on a width and a height for imported nodes.
  2. Create a node by dragging a existing template from yEd's palette into yEd's editor area.
  3. Click on the new node to select it.
  4. Set the desired width and height for that node.
  5. In the properties view in yEd's lower right corner, change 'Size' in section 'Label' to 'Fit Node Size' or 'Fit Node Width'.
  6. In the properties view in yEd's lower right corner, change 'Configuration' in section 'Label' to 'Cropping'.
  7. Create a user-defined palette section (see 'Edit' -> 'Manage Palette').
  8. Right-click the new node to open its context menu and choose 'Add to Palette'.
  9. Go to the new palette section and double-click the new node template. This will turn the palette cell background a dark blue and turn the template into the default template for new nodes.
  10. Import your spreadsheet.
    In the Excel Import settings, make sure option 'Fir Size to Label' on tab 'Presentation' is turned off.
    In the Excel Import settings, make sure option 'Template' on tab 'Presentation' is set to 'Selected Template from Palette'.
Legal Disclosure | Privacy Policy
...