- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
can you please me with this
Solved! Go to Solution.
can you please me with this
Solved! Go to Solution.
Hi! To get help here, it's better to try writing the code first and figure out what exactly is not working.
If I were you, I would start by selecting ViewSheet objects via FilteredElementCollector. Next, each ViewSheet instance has a GetAllPlacedViews method. Check if it returns any view objects. If so, then there are views on the sheet. Finally, you need to create a DWGExportOptions object. Configure its properties. And pass it to Export method of Revit document.
Generally speaking, that's all it takes.
Here are some basic Python and C# basic samples:
sheets_ids = [
sheet.Id for sheet in FEC(doc).OfClass(DB.ViewSheet)
if sheet.GetAllPlacedViews()
]
export_options = DB.DWGExportOptions()
export_options.FileVersion = DB.ACADVersion.R2013
export_options.HideScopeBox = True
export_options.HideReferencePlane = True
export_options.MergedViews = True
output_path = "D:\dwg"
doc.Export(
output_path,
'test_',
List[DB.ElementId](sheets_ids),
export_options
)
List<ElementId> sheetIds = new List<ElementId>();
FilteredElementCollector collector = new FilteredElementCollector(doc).OfClass(typeof(ViewSheet));
foreach (ViewSheet sheet in collector)
{
if (sheet.GetAllPlacedViews().Count > 0)
{
sheetIds.Add(sheet.Id);
}
}
DWGExportOptions exportOptions = new DWGExportOptions();
exportOptions.FileVersion = ACADVersion.R2013;
exportOptions.HideScopeBox = true;
exportOptions.HideReferencePlane = true;
exportOptions.MergedViews = true;
string outputPath = @"D:\dwg";
doc.Export(
outputPath,
"test_",
new List<ElementId>(sheetIds),
exportOptions
);
thank you so much for your help @architect.bim
Can you give me any idea regarding process for pdf export of that sheets
1.it should select the sheet size automatically
2.all sheets are should be saved as pdf with one click once i fired the API