// Obtain workdesk beforehand.
Workdesk workdesk = ...
List<Connection> connections = new List<Connection>();
// Connection for the first cable wire.
// First cable wire will be connected to these two pins:
OccWdPin connector1Pin1 = ...
OccWdPin connector2Pin1 = ...
connections.Add(new Connection(connector1Pin1, connector2Pin1));
// Connection for the second cable wire.
// The second cable wire will be connected to these two pins:
OccWdPin connector1Pin2 = ...
OccWdPin connector2Pin2 = ...
connections.Add(new Connection(connector1Pin2, connector2Pin2));
// Position of the first insulator end.
TransformProperty<LengthProperty> insulatorEnd1 = new TransformProperty<LengthProperty>
(
new LengthProperty(-80, Unit.Millimeter),
new LengthProperty(220, Unit.Millimeter),
new LengthProperty(140, Unit.Millimeter)
);
// Position of the second insulator end.
TransformProperty<LengthProperty> insulatorEnd2 = new TransformProperty<LengthProperty>
(
new LengthProperty(-50, Unit.Millimeter),
new LengthProperty(120, Unit.Millimeter),
new LengthProperty(70, Unit.Millimeter)
);
IOccCable cable = workdesk.PlaceRapidPrototypeCable(
new PlacePosition(insulatorEnd1),
new List<TransformProperty<LengthProperty>>(),
new PlacePosition(insulatorEnd2),
connections,
new RapidCableDefinition()
{
NumberOfWires = 2,
CableColor = Color.Black,
WireColor = Color.Red,
OutsideDiameter = new LengthProperty(4, Unit.Millimeter),
WireOutsideDiameter = new LengthProperty(2, Unit.Millimeter)
}
);