// Obtain workspace beforehand and open for writing.
Workspace workspace = ...
workspace.Open(false, false);
// Special component definition.
RapidLightDefinition definition = new RapidLightDefinition();
definition.Color = Color.Aqua;
// Obtain wire from workspace.
OccWsWire wire = workspace.GetAllOccurrences<OccWsWire>().FirstOrDefault(occ => occ.Name.ToString() == "wire1");
// Obtain controls points from wire.
List<IControlPoint> controlPoints = wire.GetAllControlPoints().ToList();
IControlPoint firstPoint = controlPoints.FirstOrDefault(c => c.Name.ToString() == "occ_1");
IControlPoint secondPoint = t.FirstOrDefault(c => c.Name.ToString() == "occ_2");
// Position of the rapid special component.
TransformProperty<LengthProperty> position = new TransformProperty<LengthProperty>
(
new LengthProperty(-50, Unit.Millimeter),
new LengthProperty(120, Unit.Millimeter),
new LengthProperty(70, Unit.Millimeter)
);
// Place attached part to occurrence.
workspace.PlaceRapidLight(definition, wire, firstPoint, secondPoint, position);