Can't import DWG files into the family document...

Can't import DWG files into the family document...

LevinLu
Explorer Explorer
687 Views
2 Replies
Message 1 of 3

Can't import DWG files into the family document...

LevinLu
Explorer
Explorer

 I am using NewFamilyDocument() function to generate a new family document. But I can't import DWG files into this document. Is there a way to achieve it?

0 Likes
688 Views
2 Replies
Replies (2)
Message 2 of 3

jeremytammik
Autodesk
Autodesk

The Revit SDK sample DWGFamilyCreation. It shows how to import a DWG file into a family document, create a new type, and add parameters to it. In this sample, one single DWG file is imported into the family document. The new type is defined, and two parameters are added to it for the DWG file name and creation time.

 

Quoted from The Building Coder discussion on DWG and DWF Family Creation, July 06, 2009:

 

http://thebuildingcoder.typepad.com/blog/2009/07/dwg-and-dwf-family-creation.html

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 3

LevinLu
Explorer
Explorer

Hi, Jeremy

 

Many thanks to you. I am already using these code from the SDK samples. But I have a new problem now.

 

I was coding in Revit 2015. When I use the family template from RVT2015, it will show some errors about the "pDBView". But if I use the RVT2014 template, it's working. Is it a bug?

 

0 Likes