Isolate element temporarily

Isolate element temporarily

office
Enthusiast Enthusiast
4,216 Views
6 Replies
Message 1 of 7

Isolate element temporarily

office
Enthusiast
Enthusiast

Are there any limitations known to "View.IsolateElementsTemporary Method "

my code:

for i in elements:
	elemId = i.Id
	ids.append(elemId)
ids2 = List[ElementId](ids)

selection = view.IsolateElementsTemporary(ids2)

 

my elements are nested curtain panels.

when i run my code with walls, it works perfectly

when it comes to nested panels i end up in an empty view

any solutions?

Accepted solutions (1)
4,217 Views
6 Replies
Replies (6)
Message 2 of 7

jeremytammik
Autodesk
Autodesk

Dear Koppevi,

 

Can you temporarily isolate the curtain panels that you are interested in manually in the user interface?

 

In general, the Revit API will not enable you to do something programmatically that cannot be achieved manually through the Revit product UI.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 7

office
Enthusiast
Enthusiast

jeremy, yes, manually everything is removable.

in a standard 3d view, the collection is even marked selected in view and when i manually hide them (using hide selected) they are hidden

thanks peter

ps. what i do is programmed in a python shell within dynamo. could that cause trouble?

0 Likes
Message 4 of 7

conoves
Autodesk
Autodesk
Accepted solution

Hello Koppevi -

 

I was curious about your problem and found that selecting curtain panels directly and choosing "Isolate Elements" results in an empty view (as you found from the API). 

 

I found that choosing the panels, selecting "Isolate Category" and then "Isolate Elements" results in just the selected elements being visible, which is what you want.  You should be able to do something similar with the API.

 

I suspect this may be a bug in Isolate Elements functionality (the underlying wall category might need to remain "on" to allow the panels to be visible and Isolate Elements may not be doing that).

 

Thank you,

 

Scott Conover



Scott Conover

Senior Engineering Manager, Revit

Message 5 of 7

Anonymous
Not applicable

Hello conoves,

Could you provide a small code-sample on how to accieve this? i am also trying to isolate a curtainwall (and all of it's contents) in a 3dview, but i am having trouble (empty view)..

 

TIA Wouter

Message 6 of 7

office
Enthusiast
Enthusiast

3 years to fix a bug ......

0 Likes
Message 7 of 7

george1985
Collaborator
Collaborator

Hi @conoves @office ,
I have just tested the python code from the first post - and I can confirm that the bug is still present in Revit 2025:
isolating a Curtain Panel, isolates everything in the active view.

Is it possible to get that workaround code, that Scott Conover mentioned? In any programming language?
I would be very grateful for that.

0 Likes