& Construction

Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
& Manufacturing

Professional CAD/CAM tools built on Inventor and AutoCAD
Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
Professional CAD/CAM tools built on Inventor and AutoCAD
I have a Vault WPF .NET C# plugin which opens a wpf window.
Now the issue is when multiple screens are connected.
WPF plugin opens only in the primary screen. not on he screen where vault is open.
Example,
Screen 1 is primary screen
Screen 2 is where vault client is open
When the plugin is fired it always opens in screen 1.
I want the plugin to open on the same screen where Vault client is open.
Any help would be appreciated.
Solved! Go to Solution.
Hello,
i think the solution is to set the Vault Client as Parent window for your WPF window.
You can achieve this by getting the MainWindowHandle from your current process (which is Vault becuause you have a Vault Addin) and then setting the Owner for your window.
Example:
using System; using System.Diagnostics; using System.Windows; using System.Windows.Interop;
var myWindow = new Window(); //Your WPF window var vaultHwnd = Process.GetCurrentProcess().MainWindowHandle; //Vault window handle new WindowInteropHelper(myWindow) { Owner = vaultHwnd }; myWindow.ShowDialog();
Additionally i would suggest to set the WindowsStartupLocation in your WPF Window to CenterOwner.
Set this in your Window.xaml :
WindowStartupLocation="CenterOwner"
How to buy
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © 2025 Autodesk Inc. All rights reserved
Type a product name