How to use show hidden lines revit api for showing element?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
We have two elements of type 1.structural framing 2.speciality eqipment.
Wants to show the lines of on element and hide other element.
Able to do manually.
By steps
1.select visual style wireframe
2.go to view then show hidden line select element through hidden line display(structural framing element),and hidden line element(speciality eqipment element)
3.select visual style hidden line.
Able to see bottom specialiy eqipment below the structural framing element
programatically tried:
View viewForPreview = revitDocument.ActiveView;
viewForPreview.get_Parameter(BuiltInParameter.MODEL_GRAPHICS_STYLE).Set(1);
viewForPreview.AreAnnotationCategoriesHidden = true;
ViewDisplayModel displayModel = viewForPreview.GetViewDisplayModel();
var lstyles = new FilteredElementCollector(revitDocument).OfClass(typeof(GraphicsStyle));
string mylinestylename = "Specialty Equipment";
var lstyl = lstyles.Where(o => o.Name.Contains(mylinestylename)).FirstOrDefault();
displayModel.SilhouetteEdgesGStyleId = lstyl.Id;
displayModel.ShowHiddenLines = ShowHiddenLinesValues.ByDiscipline;
viewForPreview.SetViewDisplayModel(displayModel);
viewForPreview.get_Parameter(BuiltInParameter.MODEL_GRAPHICS_STYLE).Set(2);
Able to see bottom specialiy eqipment below the structural framing element but some lines of structural framing elements are also shown want to hide those lines.