- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This is for the all lost souls out there, may you avoid my suffering.
To create a chromium web browser in your revit addin, you need to reference cefsharp dlls. THis is where i have a major hiccup because I just installed the newest one by nuget. Dont do this. Revit already has them and it initializes them on start up.
Yuu just need to add them like the API .dlls . They are in the CefSharp folder.
For me it was
C:\Program Files\Autodesk\Revit 2022\CefSharp
the files are
CefSharp.Core
CefSharp.Wpf
CefSharp.BrowserSubprocess.Core
CefSharp
once installed you can just add a wpf window, reference the namespace and embed a chromium browser.
Like this:
<Window x:Class="RevitTestProject.TestWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:RevitTestProject"
xmlns:cef="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"
mc:Ignorable="d"
Width="1000" Height="500">
<Grid Background="PapayaWhip">
<cef:ChromiumWebBrowser Name="ChromiumBrowser" Address="http://www.google.com" Width="900" Height="450" />
</Grid>
</Window>
Hope this helps some one as i lost an entire day figuring this out.
Solved! Go to Solution.