Many MegunoLink features can be disabled using policies when you create an installer with Builder. For example, policies could be used to:

  • hide the source selector from visualizer toolbars if you don’t want the end-user to accidentally change sources,
  • hide the plot property editor to prevent changes to axis labels, or
  • hide the column editor in the record table to prevent changes to columns.

Key Steps

The typical steps to use policies with a MegunoLink project are:

  1. Create a policy file to test the policies you want to apply to your project. Name the file Policies.xml and put it in the same folder as your MegunoLink project.
  2. Load your project in MegunoLink and check that the policies have the effect expected. Edit the policy file and reload your project in MegunoLink to see changes.
  3. Rename the Policies.xml file, or copy it to the source folder for your Builder project, so that you can make changes to your MegunoLink project that would otherwise be prevented by the Policies.xml file.
  4. Set the policies file for your MegunoLink project in Builder.
  5. Build the custom installer and install it.
  6. Open the newly installed project and check the policies achieved the desired result.

Read on for more detailed information on these steps.

Creating a Policy File

Policies are defined in an .xml text file. The policy file consists of policy nodes inside a mlp-policy root element. The root element must have the namespace set to urn:mlp-policy-schema. An example policy file is shown below:

Each policy node has one or two attributes:

  1. type (required): the type of policy defined in the node. The policy types available are shown in the table, and
  2. id (optional): the name of the visualizer the policy applies to. If the id property isn’t provided, the policies apply to all visualizers that don’t have a policy group matching their name. In the example above, the plot and series properties buttons are hidden for the visualizer named XY; the summary table and button are hidden for all other plot visualizers.
Policy type attribute values

Type Applies to
SerialVisualizer All visualizers
InterfacePanel Interface panel visualizer
Plot XY plot and time plot visualizers
PropertyTable Property table visualizer
RecordTable Record table visualizer
TextMonitor Raw serial and message monitor visualizers

Testing a Policy File

Name your policy file Policies.xml and place it in the same folder as your MegunoLink project file. MegunoLink will automatically load and apply policies from a file named Policies.xml in the same folder as the project file when the project is opened. This provides a convenient way of testing most policies without having to build and run an installer with Builder.

Policy example

Using a policy file, the plot and series properties buttons are hidden in the top plot while summary table and remove series buttons are hidden in the bottom plot.

Attaching Policies with Builder

Copy the policies file to your Builder solution folder and fill in the Policy file field in the Edit Project Item dialog to package your policy file with builder. Refer to the Builder step-by-step guide for complete details on packing your MegunoLink project into a stand-alone installation.

Set policy file in builder

Fill in the Policy file field to bundle your policies in a builder package.

Policy Reference

All the policies available to control features in MegunoLink are described below.

Policies for standalone MegunoLink host

<policy type="Host"></policy>

Property Name Values Default Description
HideMLPStatusBarLink True | False True Controls visibility of the MegunoLink link on the status bar
HideReportingMenuButton True | False True Controls visibility of the reporting menu on the application toolbar
HideManualReportGenerationMenu True | False False Controls visibility of the ‘Save Report’ menu
HideScheduledReportingMenu True | False False Controls visibility of the scheduled reporting menu option
HideReportingConfigurationMenu True | False False Controls visibility of the reporting configuration edit menu

Policies for Interface Panel Visualizers

<policy type="InterfacePanel"></policy>

Property Name Values Default Description
HideValueStoreMenu True | False False Controls visibility of value store menu button
HideSaveValuesToFile True | False False Controls visibility of save to file option on value store menu
HideLoadValuesFromFile True | False False Controls visibility of load from file option on value store menu
HideSaveValuesToProject True | False False Controls visibility of save to project option on value store menu
HideEditProjectStore True | False False Controls visibility of load from project option on value store menu
HideProjectValueStores True | False False Controls visibility of values stored project option on value store menu

Policies for Plot Visualizers

<policy type="Plot"></policy>

Property Name Values Default Description
HideEditProperties True | False False Controls visibility of the edit plot properties button on the visualizer toolbar
HideEditSeriesProperties True | False False Controls visibility of the edit series properties button on the visualizer toolbar
ShowSummaryTable Default | Visible | Hidden Default Controls initial visibility of the summary table beneath the plot.
HideShowSummaryTableButton True | False False Controls visibilty of the toolbar button to hide/show the summary table.
HideRemoveAllSeriesButton True | False False Controls visibility of the toolbar button to remove all series from the plot.
HideRemoveSelectedSeriesButton True | False False Controls visibility of the toolbar button to remove selected series from the plot.
HideLengendButton True | False False Controls visibilty of the toolbar button to show/hide the plot legend.
ShowPlotLegend Default | Visible | Hidden Default Controls visibilty of the plot legend.
HideLimitSummaryToCursorsOption True | False False Controls visibility of the option to limit the summary table to a cursor range
ShowCursorsPanel Default | Visible | Hidden Default Controls visibility of curors panel
HideCursorEditControls True | False False Controls the visibility of edit controls on the cursors panel
HideRunButton True | False False Controls the visibility of the run button
Run Default | Run | Stopped Default Controls the initial state of run mode.
DefaultTool None | Default | Select | Zoom | ZoomHorizontal | ZoomVertical | Pan | PanHorizontal | PanVertical | MoveCursors Select Sets the initially selected tool
HideSelectionTool True | False False Controls the visibility of the selection tool on the toolbar
HideZoomTool True | False False Controls the visibility of the zoom tool on the toolbar
HidePanTool True | False False Controls the visibility of the pan tool on the toolbar
HideMoveCursorTool True | False False Controls the visibility of the move-cursor tool on the toolbar
HideZoomAllButton True | False False Controls the visibility of the zoom all button on the toolbar
HideZoomBackButton True | False False Controls the visibility of the zoom back button on the toolbar
HideSaveChartDataButton True | False False Controls the visibility of the save chart data button on the toolbar
HideCopyChartDataButton True | False False Controls the visibility of the copy chart data button on the toolbar
HideImportChartDataButton True | False False Controls visibility of the import chart data button on the toolbar

Policies for Property Table Visualizers

<policy type="PropertyTable"></policy>

Property Name Values Default Description
HideReorderButtons True | False False Controls visibility of row-order buttons
HideSendSelectedButton True | False False Controls visibility of the send selected button
HideSendAllButton True | False False Controls visibility of the send all button
HideClearTableButton True | False False Controls visibility of the clear table button
HideCopyDataButton True | False False Controls visibility of the copy data button
HideSaveDataButton True | False False Controls visibility of the save data button

Policies for Record Table Visualizers

<policy type="RecordTable"></policy>

Property Name Values Default Description
HideReorderButtons True | False False Controls visibility of row-order buttons
HideAutoScrollButton True | False False Controls visibility of the auto-scroll to end button
HideEditColumnsButton True | False False Controls visibility of the edit columns button
HideDeleteSelectedButton True | False False Controls visibility of the delete selection button
HideClearTableButton True | False False Controls visibility of the clear table button
HideCopyDataButton True | False False Controls visibility of the copy data button
HideSaveDataButton True | False False Controls visibility of the save data button

Policies for Program Devices Visualizer

<policy type="UploadManager"></policy>

Property Name Values Default Description
HideAddProgrammer True | False False Controls visibility of the add programmer button on the visualizer toolbar
HideReorderProgrammers True | False False Controls visibility of the order programmers button on the visualizer toolbar
HideProgramAll True | False False Controls visibility of the program all button on the visualizer toolbar
HideDeleteProgrammer True | False False Controls visibility of the delete button on programmer panels
DisableBrowseSource True | False False Controls whether the user can select a new source file on programmer panels
LockProgrammer True | False False Prevents the user from changing the selected programmer
LockDevice True | False False Prevents the user from changing the selected device

Common Policies for all Visualizers

<policy type="SerialVisualizer"></policy>

Property Name Values Default Description
HideSourceSelector True | False True Controls visilibility of the source selector on visualizer toolbars
HideChannelSelector True | False True Controls visilibility of the channel selector on visualizer toolbars
HideHelpButton True | False True Controls visilibility of the help button on visualizer toolbars
HideTabContextMenu True | False True Controls visibility of visualizer tab context menu

Policies for Monitor and Message Monitor Visualizers

<policy type="TextMonitor"></policy>

Property Name Values Default Description
HideSendControls True | False False Controls visibility of the controls to send messages
HideCopyButton True | False False Controls visibility of the copy button
HideShowHiddenSymbolsButton True | False False Controls visibility of the end-of-line markers button
HideSaveButton True | False False Controls visibility of the save button
HideAutoScrollButton True | False False Controls visibility of the auto-scroll to end button
HideShowTimeButton True | False False Controls visibility of the line-time button
HideShowDateButton True | False False Controls visibility of the line-date button
HideClearButton True | False False Controls visibility of the clear button
HideSpeechButton True | False False Controls visibility of the speech options

Start typing and press Enter to search