Why I can't to load one family to another?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
On debugging the following code I have an exeption on load method (shown bold)
string templateFileName = @"C:\Documents and Settings\All Users\Application Data\Autodesk\RVT 2014\Family Templates\Russian\Метрическая система, типовая модель.rft";
Document familyPlate = externalCommandData.Application.Application.NewFamilyDocument(templateFileName);
Transaction transaction = new Transaction(familyPlate, "pop");
transaction.Start();
familyPlate.OwnerFamily.Name = "Plate";
familyPlate.FamilyManager.NewType("Plate Type 1");
transaction.Commit();
familyPlate.SaveAs(@"D:\Arhive\Visual Studio\HelloWorld\1.rfa");
Document familyBlock = externalCommandData.Application.Application.NewFamilyDocument(templateFileName);
Transaction transaction2 = new Transaction(familyBlock, "pop2");
transaction2.Start();
familyBlock.LoadFamily(familyPlate);
transaction2.Commit();
familyBlock.SaveAs(@"D:\Arhive\Visual Studio\HelloWorld\2.rfa");
return Autodesk.Revit.UI.Result.Succeeded;