using (MDPartsDatabase partsDatabase = new MDPartsManagement().OpenDatabase())
{
//Get all parts which part number starts on "SIE"
MDObjectFilter mDObjectFilter = new MDObjectFilter();
mDObjectFilter.AddPropertyCondition(22001, MDObjectFilter.CompareOperator.OperatorEqual, "SIE*"); //22001 - enum Properties.MDPartsDatabaseItem
MDPart[] arrParts = partsDatabase.GetParts(mDObjectFilter);
partsDatabase.ExportParts("C:\\exportDirectory\\exportFile.xml", MDPartsDatabase.DataFormat.XML, arrParts);
}