Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Setting and Unsetting Occurrence.isIsolated does not match UI behavior

jsormaz
Advocate

Setting and Unsetting Occurrence.isIsolated does not match UI behavior

jsormaz
Advocate
Advocate

Using `Occurrence.isIsolated = True` and later `Occurrence.isIsolated = False` results in the occurrence being the only visible item.

 

In the UI, right click>isolate and right click>Unisolate results in the original item visibility (whatever you had shown / hidden before the action)

Instagram:
@sonsofsormaz
0 Likes
Reply
270 Views
2 Replies
Replies (2)

rohit.bapat
Autodesk
Autodesk

Hello @jsormaz 

 

Thank you for posting your query. I tried a quick sample with following script and it worked. Maybe I am missing something. Can you please post the script you are using?

import traceback
import adsk.core as core
import adsk.fusion as fusion

def run(context):
    ui: core.UserInterface = None
    try:
        app: core.Application = core.Application.get()
        ui = app.userInterface
        des: fusion.Design = app.activeProduct
        root: fusion.Component = des.rootComponent

        occ = root.allOccurrences[0]
        occ.isIsolated = True
        ui.messageBox('Sample Dialog','Sample dialog to pause operations. Click ok')
        occ.isIsolated = False
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

 





Rohit Bapat
Product Owner
1 Like

jsormaz
Advocate
Advocate

Thanks @rohit.bapat 

 

I dug in a little more. It looks like the component I was trying to isolate was a referenced component, so I guess isIsolated is undefined in that case (there isn't even a ui option to isolate a referenced component).

 

Curious if there are alternatives. I'm trying to walk through the component tree and take special images of each component. My workaround right now is to Documents.open() the referenced component, take the image, then close that component, which feels a little clunky, as there may be multiple levels of referenced components in a tree.

Instagram:
@sonsofsormaz
0 Likes