Quick Start¶
Build a HydroMan plugin that adds a Search menu item and shows a message when clicked. HydroMan does not pull title-block fields from plugins on file open, so a menu action is the natural starting point.
Prerequisites¶
- Windows 10 or later.
- .NET 8 SDK or later: plugins target
net8.0-windows. - Visual C++ build tools (MSVC): required for NativeAOT. Install "Desktop development with C++" from the Visual Studio Installer.
- HydroMan 2026 or later: Plugin API v1.
- PARO HydroMan SDK packages: the
PARO.HydroMan.Plugintemplate and thePARO.HydroMan.PluginSDKlibrary. PARO supplies them; they are not on nuget.org yet.
HydroMan is a 32-bit application, so the plugin is published as win-x86. The template sets this up.
1. Create the project¶
The template gives you MyPlugin.cs, a Startup.cs that registers the plugin, and a .csproj with the NativeAOT settings.
Without the template: create a net8.0-windows class library, add a PackageReference to PARO.HydroMan.PluginSDK, set the .csproj properties listed in Build & Deploy, and register your plugin class once:
using System.Runtime.CompilerServices;
using PARO.HydroMan.PluginSDK;
internal static class Startup
{
[ModuleInitializer]
internal static void Init() => PluginRegistration.Register(new MyPlugin());
}
Without PluginRegistration.Register, the plugin fails to load with "No plugin registered".
2. Implement GetInfo¶
using PARO.HydroMan.PluginSDK;
using PARO.HydroMan.PluginSDK.Models;
public class MyPlugin : HydroManPluginBase
{
public override GetInfoResponse GetInfo() => new()
{
Name = "My Plugin",
Vendor = "Your Company",
Version = "1.0.0",
ApiVersion = 1,
Capabilities = DeriveCapabilities(),
Menus =
[
new MenuItem
{
Id = "my-search",
Label = "&Search...",
Location = "plugin",
}
],
};
}
DeriveCapabilities() lists the optional methods you override: BeforeFileOpen, BeforeFileClose, and SetProjectVariables. A menu-only plugin gets []. If an optional method never runs, its capability is missing from the list; keep Capabilities = DeriveCapabilities(). See Architecture.
Location = "plugin" puts the item under a top-level menu named after your plugin. See Menu Integration.
3. Handle OnMenuAction¶
public override void OnMenuAction(OnMenuActionRequest request)
{
if (request.MenuItemId != "my-search")
return;
Host.ShowMessage("Hello from MyPlugin");
}
4. Implement Initialize (optional)¶
public override void Initialize(InitializeRequest request)
{
// request.ConfigPath is the ConfigPath value from Hydroman.ini [Plugin]
// request.HostDataPath is %APPDATA%\PARO\Hydroman\
// request.HostVersion is the HydroMan display version, for example "2026"
}
5. Build and deploy¶
Copy MyPlugin.dll from bin/Release/net8.0-windows/win-x86/publish/ into a folder such as C:\ProgramData\PARO\Hydroman\Plugins\MyPlugin\. Then register it in %APPDATA%\PARO\Hydroman\Ini\Hydroman.ini:
[Plugin]
Enabled=1
DllPath=C:\ProgramData\PARO\Hydroman\Plugins\MyPlugin\MyPlugin.dll
ConfigPath=C:\ProgramData\PARO\Hydroman\Plugins\MyPlugin\plugin.ini
Use an absolute path for DllPath; environment variables are not expanded. See Build & Deploy for the full layout.
6. Verify¶
Restart HydroMan. A menu named My Plugin appears at the right end of the menu bar. Click Search... and confirm the message appears.
If the menu does not appear, HydroMan shows a warning dialog at startup with the load error. See Build & Deploy → Troubleshooting.
Next steps¶
- Try
Host.OpenProject,Host.ExportPdf, orHost.SaveFile. See Host API - Menu Integration: settings dialog (
HasSettings,ShowSettings) - Workflows: when each method is called
- PDM integration: file hooks and check-in
- API Reference: field-level schemas