Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

hide elements in linked model

hide elements in linked model

This is a very important functionality that we need for our interior design firm.  We work on large hotel projects within the architect's linked model.  If we are working on a design option within the architects linked model, we need to be able to remove certain bits of the architectural work so we can draw our revised layout proposals.  This is extremely painful to do under the current circumstances.  It is crucial to our work to be able to hide and unhide elements within linked models.  This is not possible using the API either...believe me, I've tried:

 

https://forums.autodesk.com/t5/revit-api-forum/hide-elements-in-linked-file/td-p/5777305

 

James

27 Comments
james.levieux
Advocate

So is this impossible?  I feel like I'm shouting into the wind here but I'm just going to keep going on because my life is hell no matter what I do....

 

  1. Selection filters that work on linked models are ESSENTIAL for interiors work.
  2. The architect won't commit to changing their shell until we have approvals from ownership.  So we are FORCED to do all our presentation drawings by modifying their shell model using "hiding in view".
  3. Most Revit user who work with linked models know how stupidly difficult it is to select multiple elements in a linked model...and then have to do it over and over again IN EVERY VIEW so each view looks consistent.
  4. Rules filters are NOT adequate for the wide variety of elements that we may need to hide.
  5. Asking the architect to use additional worksets or design options is not an option.  We need to be able to hide  a wide selection or random objects unilaterally and globally or our life is hell using Revit.

I love Revit but I hate this shortcoming just as much.  It makes me sad that this wonderful product does not deliver for us.  We will still use Revit (because that's how we get some of our jobs) but we don't LIKE it.

 

James

jeremy_tammik
Autodesk

Thank you for your perseverance and passion. I passed this on as well. I'm sure you will be heard sooner or later. Looking forward to hearing their response.

Mbruno-JDB
Advocate

@james.levieux ,

 

I'd just like to say that I work in Foodservice consulting.  We have same issues with hiding walls in linked models, drawing in our own to show the architect where we want them.  Then we have to check updated models to see if the hidden walls have been fixed, then unhide them and delete our walls.  If we still have to hide walls once we're into CDs, it's so many more views that have to be manipulated.

I've been trying to come up with a better process, but so far it's eluded me.

 

lvirone
Enthusiast

Hello everyone,

 

I've found a solution:

//Select elements using UIDocument and then use PostCommand "HideElements"

//elemsFromRevitLinkInstance is "List<Element>", there are the elements you want to hide in the link
var refs = elemsFromRevitLinkInstance.Select(x => new Reference(x).CreateLinkReference(revitLinkInstance)).ToList();

uidoc.Selection.SetReferences(refs);

uidoc.Application.PostCommand(RevitCommandId.LookupPostableCommandId(PostableCommand.HideElements));

 

I've posted the solution in this thread too: https://forums.autodesk.com/t5/revit-api-forum/hide-elements-in-linked-file/td-p/5777305

rmc9WR3X
Enthusiast

This should be basic functionality. In our industry we send out RVT models and our clients often take our custom elements and reposition them as they wish then send back their site model including our elements. This is handy for knowing exactly where they want things, but is a massive headache because Revit has no way to target and hide our elements since all the target words like Manufacturer field and description also apply to our newly placed elements in the current revision. So we have to manually Hide Elements in every view by individually clicking on every one of them. This is unbearable.

lvirone
Enthusiast

Hello,

 

You don't need to select elements one by one manually, it's fully automatic!

 

Here is an example without asking the user to select anything :

 

Select the first RevitLinkInstance, retrieve the floors, hide the floors

                //Get a link
                var filter = new ElementClassFilter(typeof(RevitLinkInstance));
                var firstInstanceLink = (RevitLinkInstance)new FilteredElementCollector(doc).WherePasses(filter).ToElements().First();

                //Get its floors
                filter = new ElementClassFilter(typeof(Floor));
                var elemsFromRevitLinkInstance = new FilteredElementCollector(firstInstanceLink.GetLinkDocument()).WherePasses(filter).ToElements();

                //Isolate them
                var refs = elemsFromRevitLinkInstance.Select(x => new Reference(x).CreateLinkReference(firstInstanceLink)).ToList();

                uidoc.Selection.SetReferences(refs);
                uidoc.Application.PostCommand(RevitCommandId.LookupPostableCommandId(PostableCommand.HideElements));

 

rmc9WR3X
Enthusiast

@lvirone Thank you for the code snippet. Have you built this into an Add-in that can simply be installed?

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

Submit Idea  

Autodesk Design & Make Report