Skip to content

API Reference

Plugin Methods

Methods HydroSym calls on your plugin DLL, grouped by category.

Method Category Capability Description
GetInfo Lifecycle None Returns plugin metadata. Called immediately after loading to verify compatibility.
Initialize Lifecycle None Establish connections and load configuration.
Finalize Lifecycle None Close connections and release resources.
BeforeFileClose Lifecycle beforeFileClose Called when the user closes a project, before the native save prompt. The plugin may veto the close.
BeforeFileOpen Lifecycle beforeFileOpen Called after a project file is loaded, before the user works with it. The plugin may veto the open or ask the host to drop variables.
OnMenuAction Menu & UI None Called when the user clicks a plugin menu item.
GetMenuItemState Menu & UI None Query dynamic enabled/disabled/checked state of menu items.
ShowSettings Menu & UI None Show the plugin's settings dialog.
GetFileStatus Document Management getFileStatus Query the PDM status of a file. Called on open if advertised; HydroSym does not use the result today.
SaveFile Document Management saveFile Not invoked by HydroSym in API v1. Upload from OnMenuAction after Host.ExportDrawing instead.
GetProjectVariables Project Metadata getProjectVariables Retrieve project metadata from the external system.
SetProjectVariables Project Metadata setProjectVariables Push project metadata to the external system.

Host API

Methods your plugin calls back into HydroSym via Host.

Method Category Description
Host.ShowMessage UI Display a modal message box with an OK button.
Host.SetStatusBar UI Update the host application's status bar with a plugin message.
Host.GetCurrentProject Project Information Get information about the currently open project.
Host.GetProjectVariables Project Information Read the project variables as HydroSym currently has them.
Host.GetComponentList Project Information Get a list of all components in the current schematic.
Host.GetIBorders Project Information List all i-borders in the current schematic.
Host.GetBom BOM Get the current BOM as HydroSym has it, built from the schematic.
Host.ExportDrawing Export Ask HydroSym to export the current drawing to a file.
Host.ExportBom Export Ask HydroSym to export the current BOM to a file.
Host.OpenProject Project Actions Ask HydroSym to open a project file.
Host.NewProject Project Actions Create a new schematic the same way File > New does, then save it to filePath with no Save As dialog.
Host.SaveProjectAs Project Actions Save the currently open schematic to filePath with no Save As dialog (in-memory content, including unsaved edits).
Host.SaveFile Project Actions Ask HydroSym to save a schematic to its current path.
Host.SetProjectVariables Project Actions Push variables into HydroSym's current project attribute list (title block).