Hi there,
I wonder if its possible to toggle the "Show" option for categories like Model, Annotation, Analytical, ... by api. I'd like to switch them on/off but couldn't find the proper way.
Thanks in advance..
Show Categories.png
|
Hi there,
I wonder if its possible to toggle the "Show" option for categories like Model, Annotation, Analytical, ... by api. I'd like to switch them on/off but couldn't find the proper way.
Thanks in advance..
Show Categories.png
Ok I'll answer my own question for anybody who is interested
since version 2015, you can use the following properties which have the possibility to be toggled. For a Revit Api external command :
public class yourCommand : IExternalCommand
{
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
{
commandData.Application.ActiveUIDocument.Document.ActiveView.AreModelCategoriesHidden = false; // set true to hide
commandData.Application.ActiveUIDocument.Document.ActiveView.AreAnnotationCategoriesHidden = true;
commandData.Application.ActiveUIDocument.Document.ActiveView.AreAnalyticalModelCategoriesHidden = true;
commandData.Application.ActiveUIDocument.Document.ActiveView.AreImportCategoriesHidden = true;
return Result.Succeeded;
}
public Result OnShutdown(UIControlledApplication application)
{
return Result.Succeeded;
}
}