Options

_BackupLayouts, _PhysicalZoomProperties, _PhysicalZoomPropertiesCursor, _RestoreLayouts, AllowZoomUnderBestFit, AutoZoomInMeasurement, BackupLayouts, DisplayColorSpace, DisplayOptions, EnableButtons, EnableLayouts, KeepPicWndAspect, KeepTextZoom, MeasColors, ND_CloseAcqAfterRun, Redraw, ReloadCurrentLayout, ReloadDefaultLayout, RestoreLayouts, RestoreLayoutsEx, SaveCurrentLayout, SaveCurrentLayoutAs, SaveCurrentLayoutAsDefault, SetBackground, SetCommandText, SetDarkColorScheme, SetDefaultVDockerSide, SetInitialZoom, SetLayoutGuiZoom, SetLineThicknessEx, SetMultiWindowLiveZoom100, SetPhysicalZoom, SetSaveDialogPrompt, SetScreenTextEx, SetStatusBarZIndex, SetToolbarsPlacement, ShowComponentTabs, ShowGUI, ShowPhysicalZoom, ShowScrollbars, ShowSplitCompAllChannels, ShowSplitCompCustomChannels, ShowSplitCompPerCamera, ShowTaskbar, ShowThumbsInProc, SplitCompVAASSync, StretchAppWindow, SuppressDisplay, SuppressLMDisplay, Toggle4KLayoutGuiZoom, ToggleColorScheme, ToggleShowPhysicalZoom, ToggleShowScrollbars, ToggleTaskbar, UseAdvacedButtons, ViewSplitComponents

AllowZoomUnderBestFit

Description 

 AllowZoomUnderBestFit(
   int  AllowZoomUnderBestFit
);

This function swaps the Edit > General Options > Appearance > Allow zoom factors lower than best fit option.

Parameters

int AllowZoomUnderBestFit

Sets the option (un)checked.

0

Denies the zoom lower than best fit

1

Allows the zoom lower than best fit

AutoZoomInMeasurement

Description 

 AutoZoomInMeasurement(
   int  Enabled
);

This function swaps the Edit > General Options > Measurement > Automatically zoom in Length manual measurements option.

Parameters

int Enabled

0

Disabled.

1

Enabled.

BackupLayouts

Description 

 BackupLayouts(
   char *Filename
);

This function saves settings of all currently defined layouts to an XML file.

Parameters

char *Filename

Full path to the XML file. E.g. C:\backup\backup1.xml

DisplayColorSpace

Description 

 DisplayColorSpace(
   int  ColorSpace
);

Changes coordinate space at the status bar from RGB to HSI and vice versa.

Parameters

int ColorSpace

color space

0

RGB

1

HSI

DisplayOptions

Description 

 DisplayOptions(
   int  MacroName,
   int  UserText,
   char *TextInCaption
);

This function enables you to customize the NIS-Elements caption.

Parameters

int MacroName

Specifies, if name of the active macro is shown in the caption. The active macro is the macro checked at the bottom of the Macro menu.

0

Hides the active macro name.

1

Shows the active macro name.

int UserText

Specifies, if a user-defined text is shown or hidden in the caption. The user-defined text can be set by the TextInCaption parameter.

0

Hides user text.

1

Shows user text.

char *TextInCaption

Allows you to set the text that can appear in the caption.

See Also 
DisplayColorSpace, OverlayTransparency

EnableButtons

Description 

 EnableButtons(
   int  benable
);

This function enables/disables buttons (binary, color, ..., overlay, user) on the right side of the screen.

Parameters

int benable

Enable / disable buttons.

0

Disable buttons.

1

Enable buttons.

Return Values

The function returns TRUE.

EnableLayouts

Description 

 EnableLayouts(
   bool  EnableLayouts
);

This function enables/disables the application layout management. It corresponds to the Show Layout Tabs check box in the Options dialog window.

Parameters

bool EnableLayouts

Enable or disable the layout tabs in the bottom-left corner of the application window.

See Also 
_GeneralOptions

KeepPicWndAspect

Description 

 KeepPicWndAspect(
   bool  KeepPicWndAspect
);

This function corresponds to the Edit > General Options > Appearance > Keep picture window aspect check box. If checked, the document window with an image opened respects the image size while zooming.

Parameters

bool KeepPicWndAspect

Set whether to respect the image zoom or not.

See Also 
_GeneralOptions

KeepTextZoom

Description 

 KeepTextZoom(
   int  KeepTextZoom
);

This function corresponds to the Edit > General Options > Appearance > Keep text size while zooming check box. It makes the text annotations keep their size even if the image is being zoomed.

Parameters

int KeepTextZoom

0

Zoom text annotations with the image.

1

Keep the text size 1:1

MeasColors

Description 

 MeasColors(
   int  Excl,
   int  Out
);

Sets the colors for indicating measured objects status.

Parameters

int Excl

color of the excluded objects due to measurement restrictions

int Out

color of the objects not inside measurement frame or ROI

ND_CloseAcqAfterRun

Description 

 ND_CloseAcqAfterRun(
   int  Enabled
);

Modifies the Close ND Acquisition Window after Run option status. See Edit > Options .

Parameters

int Enabled

0

Disabled.

1

Enabled.

Redraw

Description 

 Redraw();

This function redraws the screen. It handles non-standard situations, when the screen is not repainted properly.

ReloadCurrentLayout

This function runs the View > Layout > Reload Current Layout command.

Description 

 ReloadCurrentLayout();

This function reloads the current layout settings. It discards changes made from the moment it was last saved.

ReloadDefaultLayout

Description 

 ReloadDefaultLayout();

This function reloads default layout of the application.

RestoreLayouts

Description 

 RestoreLayouts(
   char *Filename
);

This function loads settings of layouts from an XML file.

Parameters

char *Filename

Full path to the XML file. E.g. C:\backup\backup1.xml

RestoreLayoutsEx

Description 

 RestoreLayoutsEx(
   char *Filename,
   int  Options
);

This function loads settings of layouts from an XML file.

Parameters

char *Filename

Full path to the XML file. E.g. C:\backup\backup1.xml

int Options

If a configuration file (optical configurations, objectives, layouts, etc...) is being imported, this parameter specifies how to behave to the items contained in the file which have a matching item already defined in the application.

0

Opens a dialog window and asks the user what to do.

1

Overwrites the old layout with the new one.

2

Does not import the new layout

3

Imports the new layout and renames it automatically (appends an index number)

SaveCurrentLayout

This function runs the View > Layout > Save Current Layout command.

Description 

 SaveCurrentLayout();

This function saves changes of the current layout.

SaveCurrentLayoutAs

This function runs the View > Layout > Save Current Layout As command.

Description 

 SaveCurrentLayoutAs();

This function enables you to save the current layout under a different name. A dialog window appears. Select an existing layout to be overwritten or fill in a name for the new layout.

SaveCurrentLayoutAsDefault

This function runs the View > Layout > Save Current Layout As Default command.

Description 

 SaveCurrentLayoutAsDefault();

This function saves the current layout of the application as default.

SetBackground

Description 

 SetBackground(
   int  Background
);

Changes the color and appearance of the image window background. The functions corresponds to setting the background in Appearance options.

Parameters

int Background

Color of the background.

-1

Tiled background (default)

0

Black

1

White

RGB value

Color as an integer value, (hexadecimal form: 0xRRGGBB)

See Also 
RGB

SetCommandText

Description 

 SetCommandText(
   char *text
);

This function draws a text in the status bar.

Parameters

char *text

Text to be displayed at the command line.

Note

This is useful when running loops within a macro and the user is not interested to see flashing command line. Also it significantly speeds up the execution of the loops. When the macro is finished or you specify NULL (0) as a parameter then the command line is refreshed as usually.

SetDarkColorScheme

Description 

 SetDarkColorScheme(
   int  DarkScheme
);

This function changes the application appearance.

Parameters

int DarkScheme

Sets the application color scheme.

1

sets the light scheme

2

sets the dark scheme

3

sets the extra dark scheme

SetDefaultVDockerSide

Description 

 SetDefaultVDockerSide(
   int  DockingView
);

Determines the default side where the control panels are docked after double-clicking their caption.

Parameters

int DockingView

The docking pane selection.

DOCK_LEFT

Left

DOCK_TOP

Top

DOCK_RIGHT

Right

DOCK_BOTTOM

Bottom

SetInitialZoom

Description 

 SetInitialZoom(
   int  InitialZoom
);

This function corresponds to the Edit > General Options > Appearance > Initial Zoom combo box. Sets the initial zoom of the document window.

Parameters

int InitialZoom

Initial zoom in percent for positive value, fit an image to the document window for zero.

See Also 
_GeneralOptions

SetLayoutGuiZoom

Description 

 SetLayoutGuiZoom(
   double  LayoutGuiZoom
);

This function zooms the whole application window in/out and changes the size of the controls.

Parameters

double LayoutGuiZoom

Zoom factor of the GUI.

SetLineThicknessEx

Description 

 SetLineThicknessEx(
   int  Thickness,
   int  Color,
   int  transparent
);

This function defines thickness of the lines, color of the lines and transparency of the text for functions with output to the screen.

Thickness parameter specifies the thickness of the lines when drawing lines on screen. 1..10 line width in pixels.

Parameters

int Thickness

Specifies the thickness.

int Color

Index of a predefined color:

0

Red

RGB (255, 0, 0)

1

Green

RGB (0, 255, 0)

2

Blue

RGB (0, 0, 255)

3

Yellow

RGB (255, 255, 0)

4

Magenta / Fuchsia

RGB (255, 0, 255)

5

Cyan / Aqua

RGB (0, 255, 255)

6

Black

RGB (0, 0, 0)

7

White

RGB (255, 255, 255)

int transparent

Specifies type of the text background.

0

White background.

1

Transparent background.

SetMultiWindowLiveZoom100

Description 

 SetMultiWindowLiveZoom100(
   int  Zoom100
);

Sets the option if the Live and Capture windows should start in 100% zoom.

Parameters

int Zoom100

0

Default zoom

1

Use 100% zoom.

SetPhysicalZoom

Description 

 SetPhysicalZoom(
   int  Index
);

Displays the current (calibrated) image using the selected magnification as if you observed the sample using a magnifier glass with the zoom magnification specified by the Index parameter (0 = 25x, 1 = 50x, 2 = 100x, 3 = 200x, 4 = 400x, 5 = 800x).

Parameters

int Index

Index number (zero-based).

SetSaveDialogPrompt

Description 

 SetSaveDialogPrompt(
   int  Discard
);

This function changes the options offered in the dialog when an image is closed without saved changes.

Parameters

int Discard

Offered commands in the Save notification dialog.

1

Save, Discard, Close

1

Save, Close, Cancel

SetScreenTextEx

Description 

 SetScreenTextEx(
   int  Format,
   int  ShortFeat
);

Configures text annotations of the measurement.

Parameters

int Format

Specifies how the text will be inserted.

0

No text will be inserted.

1

Just measured value will be inserted.

2

Measured value and units will be inserted.

3

Measured value and feature name will be inserted.

4

JMeasured value, units and feature name will be inserted.

int ShortFeat

Feature name.

0

Full feature name will be inserted.

1

Short form of feature name will be inserted.

SetStatusBarZIndex

Description 

 SetStatusBarZIndex(
   int  ZIndex
);

This function sets which Z-drive info is displayed within the main status bar in case there are two Z drives connected to the system.

Parameters

int ZIndex

Index in ZStack loop of desired picture frame.

0

Z1

1

Z2

2

Z1, Z2

SetToolbarsPlacement

This function runs the Toolbars command.

Description 

 SetToolbarsPlacement(
   int  ToolbarsPlacement
);

This function sets the appearance and behaviour of the image toolbars.

Parameters

int ToolbarsPlacement

Toolbar appearance.

0

visible for each image

1

automatically hide toolbars

2

hide all toolbars

ShowComponentTabs

Description 

 ShowComponentTabs(
   int  ViewingComp
);

Shows or hides the component tabs below the image.

Parameters

int ViewingComp

Visibility of the component tabs.

0

Hide

1

Show

ShowGUI

Description 

 ShowGUI(
   bool  ShowGUITop,
   bool  ShowGUILeft,
   bool  ShowGUIImageTop,
   bool  ShowGUIImageRight,
   bool  ShowGUIChannelTabs,
   bool  ShowGUIOrganizer
);

This function modifies the graphical user interface of the application. Main and document toolbars can be displayed or hidden.

Parameters

bool ShowGUITop

0

Hide the main horizontal tool bar.

1

Display the main horizontal tool bar.

bool ShowGUILeft

0

Hide the main vertical tool bar.

1

Display the main vertical tool bar.

bool ShowGUIImageTop

0

Hide the document horizontal tool bar.

1

Display the document horizontal tool bar.

bool ShowGUIImageRight

0

Hide the document vertical tool bar.

1

Display the document vertical tool bar.

bool ShowGUIChannelTabs

0

Hide the channel tabs in the bottom left corner of the document window.

1

Display the channel tabs.

bool ShowGUIOrganizer

0

Hide the Switch to Organizer button in the top right corner of the screen.

1

Show the Switch to Organizer button in the top right corner of the screen.

ShowPhysicalZoom

This function runs the Show Physical Zoom command.

Description 

 ShowPhysicalZoom(
   int  ShowPhysicalZoom
);

Displays the physical zoom of your image (how many times the image is magnified on your monitor compared to the real dimensions of the calibrated sample). Multiple monitors are supported.

Parameters

int ShowPhysicalZoom

0

Physical zoom is not shown

1

Physical zoom is shown

ShowScrollbars

This function runs the Show Scrollbars command.

Description 

 ShowScrollbars(
   int  ShowScrollbars
);

This function turns ON/OFF the visibility of the scroll bars when the image is zoomed in.

Parameters

int ShowScrollbars

Show scroll bars?

0

Hide scroll bars.

1

Show scroll bars.

See Also 
ToggleShowScrollbars

ShowSplitCompAllChannels

This function runs the Show Thumbnail of Merged All Channels command.

Description 

 ShowSplitCompAllChannels(
   int  SplitCompAllChannels
);

Sets the option whether the sub-view with all channels should be present in Split Components viewing mode

Parameters

int SplitCompAllChannels

Turns the split components on/off.

0, FALSE

off

1, TRUE

on

See Also 
ShowSplitCompCustomChannels, ViewSplitComponents

ShowSplitCompCustomChannels

This function runs the Show Thumbnail of Merged Custom Channels command.

Description 

 ShowSplitCompCustomChannels(
   int  SplitCompCustomChannels
);

Sets the option whether Custom sub-view should be present in Split Components viewing mode

Parameters

int SplitCompCustomChannels

0, FALSE

do not show

1, TRUE

show Custom sub-view

See Also 
ShowSplitCompAllChannels, ViewSplitComponents

ShowSplitCompPerCamera

Description 

 ShowSplitCompPerCamera(
   int  SplitCompAllChannels
);

For acquisition with multiple cameras this command automatically creates a tile view merging components based on the camera type.

Parameters

int SplitCompAllChannels

Turns the split components on/off.

0, FALSE

off

1, TRUE

on

ShowTaskbar

Description 

 ShowTaskbar(
   int  Show
);

This function shows or hides the task bar.

Parameters

int Show

Index of the element which should be shown or hidden.

0

Hide the pane.

1

Show the pane.

See Also 
ToggleTaskbar

ShowThumbsInProc

Description 

 ShowThumbsInProc(
   integer  ShowThumbsInProc
);

This function turns the thumbnail preview mode in image processing dialogs ON/OFF.

Parameters

integer ShowThumbsInProc

The value controls the thumbnail mode.

0

value 0 turns the mode off

1

value 1 turns the mode on

SplitCompVAASSync

Description 

 SplitCompVAASSync(
   int  SplitCompAllChannels
);

Enables synchronization of channels selection for VAAS images.

Parameters

int SplitCompAllChannels

Turns the split components on/off.

0, FALSE

off

1, TRUE

on

StretchAppWindow

Description 

 StretchAppWindow(
   int  StretchAppWindow
);

On dual-screen systems, this function enables you to stretch the application desk-top to both screens. When the application window is in focus (active), it will be brought to front on both screens.

Parameters

int StretchAppWindow

Stretch the application desktop to both screens?

0

Leave it single-screen

1

Stretch the application desktop to both screens.

SuppressDisplay

Description 

 SuppressDisplay();

This function suppresses display to speed up operations. This function is useful especially for automated measurement, where speed is the ultimate demand. This function has no menu equivalent.

See Also 
SuppressLMDisplay

SuppressLMDisplay

Description 

 SuppressLMDisplay(
   int  suppress
);

This function disables notification to NIS-Elements about changing views and processes. This function has no menu equivalent.

Parameters

int suppress

Suppress on/off.

0

Suppress off.

1

Suppress on.

See Also 
SuppressDisplay

Toggle4KLayoutGuiZoom

Description 

 Toggle4KLayoutGuiZoom();

Turns the 4K resolution GUI zoom on/off.

ToggleColorScheme

Description 

 ToggleColorScheme();

This function switches appearance of the application between the dark scheme and the light scheme.

ToggleShowPhysicalZoom

Description 

 ToggleShowPhysicalZoom();

Toggles between the physical zoom information on/off.

ToggleShowScrollbars

Description 

 ToggleShowScrollbars();

This function toggles visibility of the scroll bars when the image is zoomed in.

See Also 
ShowScrollbars

ToggleTaskbar

Description 

 ToggleTaskbar();

This function calls the ShowTaskbar and switches its parameter (0 or 1).

See Also 
ShowTaskbar

UseAdvacedButtons

Description 

 UseAdvacedButtons(
   bool  UseAdvacedButtons
);

This function corresponds to the Edit > General Options > Appearance > Image Toolbar buttons. Sets an appearance of buttons on the right document toolbar.

Parameters

bool UseAdvacedButtons

Show advanced buttons on right document toolbar.

See Also 
_GeneralOptions

ViewSplitComponents

This function runs the View > Image > ND View > Switch to Split Component View command.

Description 

 ViewSplitComponents(
   int  ViewSplitComp
);

This function turns the split component view ON/OFF.

Parameters

int ViewSplitComp

Split component view.

0

Turns the Split Components View OFF.

1

Turns the Split Components View ON.

_BackupLayouts

Description 

 _BackupLayouts();

This function displays a dialog window for exporting layouts. Settings of all layouts can be saved to an XML file.

See Also 
_BackupOptConf, _BackupObjectives

_PhysicalZoomProperties

Description 

 _PhysicalZoomProperties();

Opens the Monitor Calibration dialog window where custom monitor calibration can be made.

_PhysicalZoomPropertiesCursor

Description 

 _PhysicalZoomPropertiesCursor();

Opens the Monitor Calibration dialog window where custom monitor calibration can be made.

_RestoreLayouts

Description 

 _RestoreLayouts();

This function displays a dialog window which selects an XML file containing the layouts settings. Such *.XML file could have been created using the export option of the layout manager.