A component file provides the following information about your component:
All measurements are in pixels, and you should aim for the size of your component to fit in with others. As a reference, wires are always 2 pixels thick.
When placing, moving or resizing components in Circuit Diagram, they are always aligned to a grid. This grid is made up of 10 pixel squares, so the size of a component will always be a multiple of 10 pixels.
When you visit the editor on this website, you will be presented with a default component template. These are good starting points, since you can choose the one which is most similar to the component you want to create, and modify it as necessary.
component tag should always look like the snippet below.
<!--?xml version="1.0" encoding="utf-8"?--> <component version="1.2" xmlns="http://schemas.circuit-diagram.org/circuitDiagramDocument/2012/component/xml"> ... </component>
The first line is the standard XML declaration. The second line begins with the "component" element - this shows that the XML file represents a component. There is also an
xmlns attribute for the component namespace.
1.2 inside the
version attribute indicates that the XML syntax version 1.2 is being used. This is the only version supported by the compiler on this website.