WireViz icon indicating copy to clipboard operation
WireViz copied to clipboard

Questions: Not Connected wires and line breaks

Open mrickey opened this issue 5 months ago • 1 comments

I am not sure how to submit a question, so I'm doing it here.

Background: I am working on a cable that starts in an RJ45 connector and goes to a 2x8 header. The wiring for the RJ45 end is spec'd as T568B.

I figured out how to use "color_code" to set the T568b colors in the cable and have done my work on the RJ45 side. There is one pin on the RJ45 side that is labeled as "Not Connected", there are also two defined connections that I don't have on the other side.

Question 1: How do I represent wires in the cable that are not connected on one side? To get things working, I currently have them going to an otherwise not used pin, but I would like a better representation.

Question 2: For one of my connectors I wanted to include a note from the device manufacturer for the RJ45 connector. This note is kind of long, is there a way I can insert a line break? I tried "\n", and HTML breaks. None worked and the HTML breaks gave a runtime error.

Question 3: Is there a way to add a note to a diagram? I'm thinking of a different way to solve Question 2.

For the future, is there a better way to send comments?

Thanks in advance, Michael

mrickey avatar Aug 14 '25 17:08 mrickey

@mrickey - I'm sorry these answers are a bit late. Currently, the easiest way to ask questions like yours, is to create an issue (like you have done) or commenting an existing relevant issue. See also Contribution Guidelines.

Answer Q1: The connections should include all connected wires, and when a wire is only connected at one end, it should be the first (no left connection) or last (no right connection) entry of that connection. See also Demo-01 where the shield is only connected at one end. When a spare wire is not connected in either end, then don't include it in connections. If a whole cable, bundle (or connector) is not mentioned in connections, then it will be ignored completely, so to include a totally unconnected item in the diagram, please include it as a single entry connection as described in the connections syntax.

Answer Q2: See the multiline-strings syntax, but it also currently should work with <br/> to break the lines. Please provide your versions, YAML input, and full error messages when failing with HTML line breaks.

Answer Q3: The default HTML output template (which is always used unless specifying some other template) currently allows custom description and notes as metadata:

metadata:
  description: |-
    Describe your harness here,
    using multiple lines if needed.
  notes: |-
    <h2>Notes</h2>Place notes here,
    also using multiple lines if needed.

Note, however, that allowing both line feeds and <br/> to break lines sometimes create unwanted effects in combination with other HTML contents in the same attribute, so this might be changed in future versions.

kvid avatar Aug 29 '25 10:08 kvid