Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Export DWG Help!

0 REPLIES 0
Reply
Message 1 of 1
naroura
315 Views, 0 Replies

Export DWG Help!

Hello,

When I export a Sheet in DWG format the dwg file doesn't include the titleblock !

I have to export it twice to get the titleclock included !!!!

here is  the simple code I'm using with RST 2014:

 

public static bool ExportDWG(Autodesk.Revit.DB.Document document, View view, String Filename)
{
     bool exported = false;
     IList<string> setupNames = BaseExportOptions.GetPredefinedSetupNames(document);
if (setupNames.Count > 0)
{
// Get the export options for the first predefined setup
DWGExportOptions dwgOptions = DWGExportOptions.GetPredefinedOptions(document, setupNames[0]);
dwgOptions.FileVersion = ACADVersion.R2010;
dwgOptions.MergedViews = true;
dwgOptions.TargetUnit = ExportUnit.Meter;
dwgOptions.SharedCoords = true;

ICollection<ElementId> views = new List<ElementId>();
views.Add(view.Id);
exported = document.Export(Path.GetDirectoryName(document.PathName), Filename, views, dwgOptions);
}
return exported;
}

 

Any idea !

 

Thanks

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community