XbimWindowsUI icon indicating copy to clipboard operation
XbimWindowsUI copied to clipboard

Select and hide.

Open joselaks opened this issue 5 years ago • 2 comments

Hi ! With this code I manage to select the walls of a model. But how do I get the rest of the model hidden? The idea is to ensure that when or the user searches for an entity, not only is it selected, but also only those entities are seen.

` private void soloMuros_Click(object sender, RoutedEventArgs e) {

         var mod = pantalla.ModelProvider.ObjectInstance as IfcStore;

        if (mod == null)

            return;

        var found = mod.Instances.OfType<IIfcWallStandardCase>();

        var sel = new Xbim.Presentation.EntitySelection(false);

        sel.AddRange(found);

        pantalla.Selection = sel;

    }

`

joselaks avatar May 19 '20 20:05 joselaks

Hello, In the open version of the viewer it's tricky to hide objects, but it's possible and there are examples on how to do it e.g. by IfcType. To begin with, I'd suggest you to look Xplorer at the code behind the View->Style->Styler configuration menu. Then perhaps ask again here.

CBenghi avatar May 20 '20 14:05 CBenghi

Hi XBim Team, I want to hide/display or change the transparency of selected IPersistEntity objects. I couldn't find any sample code. I would be very happy if you could guide me.

     ```

Dim Selection As Xbim.Presentation.EntitySelection = Me.Selection For Each Entity As IPersistEntity In Selection // I want Hide/Show or change transparency Next

    
Thanks for help.

hakanornek avatar Feb 24 '24 17:02 hakanornek