Class MacroParams
Provides access to user-overridden macro step parameter values at runtime.
Call Initialize(json) once at macro startup (before any GetXxx calls).
If a step/key has no override, GetXxx returns the supplied default value.
Assembly: CAMAPI.DotnetHelper.dll
Syntax
public static class MacroParams
Methods
GetBol(int, string, bool)
Get boolean override for the given step and key, or return defaultValue.
Declaration
public static bool GetBol(int step, string key, bool defaultValue)
Parameters
Returns
GetFlt(int, string, double)
Get float (double) override for the given step and key, or return defaultValue.
Declaration
public static double GetFlt(int step, string key, double defaultValue)
Parameters
Returns
GetInt(int, string, int)
Get integer override for the given step and key, or return defaultValue.
Declaration
public static int GetInt(int step, string key, int defaultValue)
Parameters
Returns
GetStr(int, string, string)
Get string override for the given step and key, or return defaultValue.
Declaration
public static string GetStr(int step, string key, string defaultValue)
Parameters
Returns
Initialize(string?)
Initialize overrides from JSON string produced by MacrosFrm before Execute.
Format: {"stepIndex": {"key": "value"}, ...}
Empty or null string clears all overrides (all GetXxx return defaults).
Declaration
public static void Initialize(string? paramsJson)
Parameters
| Type |
Name |
Description |
| string |
paramsJson |
|