Skip to content

ricaun-io/ricaun.HelixToolkit.Wpf.Revit

Repository files navigation

ricaun.HelixToolkit.Wpf.Revit

Revit 2017 Visual Studio 2022 Nuke License MIT Build Release

PreviewWindow for Revit GeometryObjects using HelixToolkit and WPF.

PreviewWindow

The performance of the PreviewWindow can vary in how many elements are in the Helix viewer.

Install

Install the package from ricaun.HelixToolkit.Wpf.Revit.

<PackageReference Include="ricaun.HelixToolkit.Wpf.Revit" Version="*" />

This package depends on ricaun.HelixToolkit.Wpf.

<PackageReference Include="ricaun.HelixToolkit.Wpf" Version="*" />

PreviewWindow

The PreviewWindow allow to preview geometry in a WPF window using GeometryObject from Revit API

new PreviewWindow()
    .Add(Line.CreateBound(XYZ.Zero, XYZ.BasisX))
    .Add(Line.CreateBound(XYZ.Zero, XYZ.BasisY))
    .Add(Line.CreateBound(XYZ.Zero, XYZ.BasisZ))
    .ShowDialog();

The PreviewWindow has some basic methods.

previewWindow.Clear();
previewWindow.Add(visual3d);
previewWindow.Add(visual3ds);
previewWindow.ZoomExtents();

Revit

The Element could be used and the Material or GraphicsStyle will be used to render the geometry.

new PreviewWindow()
    .Add(element)
    .ShowDialog();

The Document is used to get the Material or GraphicsStyle color for GeometryObject.

new PreviewWindow()
    .SetDocument(document)
    .Add(geometryObjects)
    .ShowDialog();

The PreviewWindowRevitUtils has some utils methods to use with PreviewWindow.

previewWindow.SetOptions(options)
previewWindow.SetDocument(document);
previewWindow.Add(element);
previewWindow.Add(elements);
previewWindow.Add(geometryObject);
previewWindow.Add(geometryObjects);
previewWindow.Camera(view);
previewWindow.Camera(lookDirection, upDirection);

Release

License

This project is licensed under the MIT Licence.


Do you like this project? Please star this project on GitHub!