Can I isolate objects in linked file

Can I isolate objects in linked file

ottosson_mathias
Advocate Advocate
1,670 Views
2 Replies
Message 1 of 3

Can I isolate objects in linked file

ottosson_mathias
Advocate
Advocate

I want to isolate an object from the open model together with an object from a linked model. Is this possible somehow?

 

This code snippet only isolates the object from the current model, and "objectFromLinkedModel" is hidden:

var isolatedObjects = new List<ElementId>()
{
    objectFromCurrenntModelId,
    objectFromLinkedModelId
};

using (var transaction = new Transaction(doc, "Isolate elements"))
{
    transaction.Start();
    current3DView.IsolateElementsTemporary(isolatedObjects);
    transaction.Commit();
}

 

In the best of worlds I'm able to use IsolateElementsTemporary, but if that doesn't work, are there any other method to quickly hide all elements except those that I want to isolate? If I collect all elements and hide the in a loop, it's unfortunately reeeeally sloooow and does not work on large models.

 

Thanks!

0 Likes
1,671 Views
2 Replies
Replies (2)
Message 2 of 3

RPTHOMAS108
Mentor
Mentor

I believe you can't temporarily isolate elements from a link in the UI, therefore you will not be able to do so with the API.

0 Likes
Message 3 of 3

ottosson_mathias
Advocate
Advocate

So my suspicions were true... Do you know any other way to isolate a few specific elements without having to loop through every single object in the model and set them to hidden? Preferably just as fast as IsolateElementsTemporary.

0 Likes