using (MDPartsDatabase partsDatabase = new MDPartsManagement().OpenDatabase())
{
// Get all parts with part number beginning with "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);
}