Hide IFC Element in a View

Hello everyone on the forum.

I’ve been trying to do a way to hide all elements of a category IFC Linked in my Revit.
In this case it would hide all “IfcOpeningElement” and “IfcSpaceType.INTERNAL” in my view model.

ifc

ifc2

I’m basing myself on the following post:

however I’m not getting it, neither with the input fixed, nor selecting in the SelectModel and getting them all.
Does anyone know how to evolve this?

@renanemeyer ,

We managed that based on the Autodesk manual to have 2 Parameters:
IfcExporAs IfcOpeningElement.USERDEFINED
ObjectTypeOverride INTERNAL

So you can Catch the Parameters in a regualer Way

1 Like

Thanks for the answer.
in this case, I would not like to mess with the ifc import file (as mentioned first), but use it after imported by default.
I tried to understand in the import in the Python node that you did, but it didn’t work to develop.
I get a node that accesses the IfcExportAs to put after my:
FilteredElementCollector(Doc).OfCategory(CategoryEnum).XXXXXX?

https://ifcopenshell.github.io/docs/
i tried some stuff… actually i switched to a other software

Looking at the parameters available for an imported IFC element, and a native element… is there something which is filled out in the imported element 100% of the time that is never filled out in the native element?

If so you can utilize a parameter filter quite readily. This code repository will get you 90% of the way there, but you’ll want to use a HasValueFilterRule for the filter.

Hi there,

Did you managed to do that ? i’m working on a code but it does not seem to work…

I’ll just answer to myself as i found a non code related method to hide IfcOpeningElements when linking an IFC file. In my case the parameter named “IfcExportAs” was set to “IfcOpeningElements” , i tried applying a viewfilter on it but it didn’t work. The trick is to get the shared parameter file created when linking an IFC in Revit and add the parameter “IfcExportAs” as a project parameter under generic model category from the shared parameter file. Once you’ve done this you can create a viewfilter based on this parameter and it will work.

May this answer help someone with what i struggled to do for a long time.

How’d you get this to work? I did the same thing including being case sensitive to the parameter and the value and I still can’t get the opening elements to go away.
Additionally, I did a Dynamo scripts where I selected all elements with this parameter via filter mask and still couldn’t get these to hide. Pulling my hairs trying to hide all of these elements. They’re all generic models with IfcExportAs with value IfcOpeningElement as OP is showing.

Well i verified again what i did and it’s just that. I added a project parameter from the shared parameter file created when importing an IFC in Revit and created a viewfilter based on this parameter. You need to be sure you’re creating the project parameter from the IFC’s shared parameter file.

2 Likes

WOW! I didn’t see the IFC came with a shared parameters file. Was helping someone else to solve this. This is awesome! Really appreicate the tip. Saved me and my coworkers (who were manually hiding these per view YIKES) a lot of time!
Thank you!

1 Like