Componentsbeta for Circuit Diagram


This section contains the metadata properties for the component, such as the component name and who created it.

The following informational metadata properties can be set:

  • name - the name of your component (required)
  • author - the name of your component (required)
  • guid - the unique identifier for your component
    • This must be unique!
    • A new GUID is created for you when you use one of the templates
    • If you are not using a template, make sure you don't use the GUID from an existing component
  • additionalinformation - any extra information by the author, e.g. a link to their website

Additionally, the following properties affect the behaviour of the component:

  • minsize - the minimum size for your component (assumed to be equal to the grid size if omitted)
  • canresize - whether your component has a fixed size or can be resized by the user (assumed true if omitted)
  • canflip - whether the component can be flipped (up/down if vertical, left/right if horizontal - the actual flipping is implemented automatically; assumed false if omitted)

Each piece of metadata is made up of a single <meta> tag, inside the <declaration> tag.

<meta name="(property)" value="(value)" />


The following metadata is from the standard resistor component included with Circuit Diagram.

<!--?xml version="1.0" encoding="utf-8"?-->
<component version="1.2"
        <meta name="name" value="Resistor" />
        <meta name="guid" value="dab6d52b-51a0-49b0-bc40-3cda966148aa" />
        <meta name="minsize" value="50" />
        <meta name="canresize" value="true" />
        <meta name="canflip" value="true" />

Next: properties