/// Obtain workspace beforehand and open for writing.
Workspace workspace = ...
workspace.Open(false, false);
// Obtain a part from active library.
IEnumerable<BaseLibraryPart>parts = project.ActiveConnection.GetLibraryPartsByPartNumber("part1");
BaseLibraryPart part = parts.FirstOrDefault();
// Prepare position and rotation.
TransformProperty<LengthProperty> position = new TransformProperty<LengthProperty>(new LengthProperty(1, Unit.Meter), new LengthProperty(0, Unit.Meter), new LengthProperty(0, Unit.Meter));
TransformProperty<AngleProperty> rotation = new TransformProperty<AngleProperty>(new AngleProperty(0, Unit.Degree), new AngleProperty(0, Unit.Degree), new AngleProperty(0, Unit.Degree));
// Place a Splice with mandatory and optional accessories.
workspace.PlaceSplice(part as LibSplice, position, ApiLinkType.Optional | ApiLinkType.Mandatory);
// Or place a Splice without accessories.
workspace.PlaceSplice(part as LibSplice, position);