Connection Type Configuration File

Since the version 1.7 of BlueBrick you can extend the type of connections for the parts, letting you creating an infinite number of connection types. You can also define the color and the size of the dot used to represent the free connections in BlueBrick.

All the different connections types are described in an XML file named "ConnectionTypeList.xml" and located in a "config" folder inside a part package folder, or in the "config" folder of the BlueBrick install folder. The "ConnectionTypeList.xml" located in the "config" folder of the BlueBrick install folder and released with the application, is a legacy file containing the most common and historical connection types. You can still modify it for your own purpose, however, if you want to share with the community, new parts that you created, you probably want to create a new "ConnectionTypeList.xml" file in a "config" folder inside the package of parts that you want to distribute. See How to Share parts with the community for more details.

The file has this architecture:

Selected Connection: <SelectedConnection>
    <ColorARGB>...</ColorARGB>
    <Size>...</Size>
</SelectedConnection>
List of Connection Types: <ConnectionTypeList>
    <ConnectionType name="...">
        <ColorARGB>...</ColorARGB>
        <Size>...</Size>
        <HingeAngle>...</HingeAngle>
    </ConnectionType>
    ...
</ConnectionTypeList>

The SelectedConnection field let you define the size and the color of the connection currently selected when you click on one single part. If this field is not present in the XML file, a big red dot will be used by default. You should always use a size bigger than every size you may define in the following list of connection types, because the selection dot is drawn first, under the actual connection dot. So if you choose a too small size, the selection dot may be hidden by the connection dot.

The ColorARGB field is a 4 bytes integer written in Hexadecimal and the order of the color components are Alpha (i.e. transparency), Red, Green, Blue. Do not prefix the numbe with "0x". For example the solid green color would be FF00FF00. If this field is missing the solid black color will be used by default. Be careful to not set a null value in the Alpha channel, otherwise the dot will be totally transparent and therefore invisible.

The Size field defines the radius of the dot in Stud unit. If this field is missing a default radius of 1 stud will be used.

The HingeAngle field defines the maximum angle the bricks can rotate while they are connected. This field cannot appears in the selected connection field and is optionnal for the other connections. If this field is set with a value of 0, it has the same effect that not setting it at all (that means the connection is not an hinge). If a non null value is set then this connection is like an hinge, and the two bricks linked through this connection can rotate between them on the connection point.

The ConnectionTypeList field list a serie of ConnectionType field that describe all the different connection type.

The ConnectionType field contains also a color and a size fields for this connection. But most important, this field has a mandatory attribute called name which is the name id of the connection so this name must be a unique string among all the list of connection. This same name must be used in the XML description files of the parts in the part library in the field <connexion><type>.

For your information, here is the list of the available connections so far. Historically it was using a number, but these numbers will be renamed with a more explicit name in the 1.8 version.

1 = Rail (4.5V, 12V or 9V)
2 = Road
3 = Monorail (standard)
4 = Monorail (short curve)
5 = Duplo Rail