- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All, Is it possible to iterate all views and set the visibility of an element without making each view current/active? Similar in concept to AutoCAD's global Layer Off. ie ElementVisInAllViews(Element e, bool visibility). Thanks Dale
Courtesy Building Coder - visibility toggle:
foreach (ElementId id in ids)
{
if (id != null)
{
if (true == doc.GetElement(id).IsHidden(doc.ActiveView))
{
if (true == doc.GetElement(id).CanBeHidden(doc.ActiveView))
{
doc.ActiveView.UnhideElements(ids);
}}
else
{
doc.ActiveView.HideElements(ids);
}}}
______________
Yes, I'm Satoshi.
Solved! Go to Solution.
Link copied