// Open project
Project project = api.OpenProject(@"d:\MyProject.hxproj");
// Select and open variant
Variant variant = project.GetVariants()[0];
variant.Open(false, false);
// Select cable drawing and open it.
Drawing2D drawing = variant.GetCableDrawings().FirstOrDefault(d => d.Name == "CU_1");
//Drawing2D drawing = variant.GetNailboards().FirstOrDefault(d => d.Name == "WH_1");
drawing.Open(false, false);
// Select label occurrence.
IOcc2DLabel label = drawing.GetAllOccurrences().OfType<IOcc2DLabel>().FirstOrDefault(l => l.Name == "lbl_00001");
// Select its 2D view.
LibPart2DViewInfo libPartView = label.LibraryPart.Views.FirstOrDefault(v => v.Id == "2D1");
// Prepare its position.
Transform2DProperty<LengthProperty> symbolPosition = new Transform2DProperty<LengthProperty>("13.2 mm", "-5.6 mm");
// Place the symbol.
I2DSymbol symbol = drawing.PlaceLabelSymbol(label, symbolPosition, libPartView);
// Save and close the project.
drawing.Save();
drawing.Close();
variant.Close();
project.Close();