RevitCity.com Logo

Home  |  Forums  |  Downloads  |  Gallery  |  News & Articles  |  Resources  |  Jobs  |  FAQ  |  SearchSearch  |  Join  |  LoginLogin

Welcome !

525 Users Online (13 Members): Show Users Online - Most ever was 3914 - Wed, Aug 26, 2026 at 4:53:14 AM

 

Forums

Forums >> Workflow & Implementation >> API & Third Party Apps >> Why I can't to load one family to another?

Search this ThreadSearch this Thread | Page 1 of 1 |

Thu, Aug 1, 2013 at 10:36:04 AM | Why I can't to load one family to another?

#1

lebedun


active

Joined: Wed, Jul 31, 2013
2 Posts
No Rating


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;



Edited on: Thu, Aug 1, 2013 at 10:38:29 AM

This user is offline

 

Thu, Aug 8, 2013 at 4:11:21 PM | Why I can't to load one family to another?

#2

stealthnyc


active

Joined: Thu, Sep 13, 2007
63 Posts
4.5 Stars: 2 Votes


I'm no expert, but have you tried only using one transaction instead of two?


This user is offline

 

Search this ThreadSearch this Thread | Page 1 of 1 |



Similar Threads

Thread/Thread Starter

Forum

Last Post

Replies

Create.NewFamilyInstance isn't displaying a new family on sheet

Community >> Newbies

Mon, May 9, 2011 at 1:06:22 PM

0

RevDev Studios - RevEx and RevXL - Spreadsheet plugins for Revit

Workflow & Implementation >> API & Third Party Apps

Tue, Feb 28, 2017 at 7:32:28 AM

0

Modelling terrain Revit imported from AutoCad

General Discussion >> Revit Project Management

Thu, Oct 20, 2011 at 10:56:40 AM

2

Revit 2016 Annotative Demo Tag Formula

Revit Building >> Technical Support

Tue, Apr 26, 2016 at 5:56:03 PM

5

Help! Edit Family

Revit Building >> Tips & Tricks

Wed, Nov 30, 2005 at 11:41:21 PM

2

Site Stats

Members:

2187936

Objects:

23399

Forum Posts:

152454

Job Listings:

0

Sponsored Ads

Home | Forums | Downloads | Gallery | News & Articles | Resources | Jobs | Search | Advertise | About RevitCity.com | Link To Us | Site Map | Member List | Firm List | Contact Us

Copyright 2003-2010 Pierced Media LC, a design company. All Rights Reserved.

Page generation time: 1.7634

Login

User Name:

Password:

Remember Me  

Forgot Password?

Search Forums

Advanced Search

Search Forums

Advanced Search


Clear Highlights


Clear Highlights