Script Block Examples – Blue Read

To run the example below, right-click the script block, click Reconfigure Script I/O. It will open the Script Definition Editor window and there set Return Type as String.

Write the example codes and run the script.

Copy

Example Script

// Convert Runtime Block's Sample object to an IBlueMarking object
var blueReadMarkings = $Tasks.Task.DeepLearningRuntimeBlock.Sample.Markings["Read"] as IBlueMarking;

// Convert Blue Tool's model matches to IReadModelMatch.
// This line of code presumes that there is only one view, and only one model type.
var readmodelmatch = blueReadMarkings.Views.First().Matches.First() as IReadModelMatch;

// Get the Model Match Feature String
var resultString = readmodelmatch.FeatureString;

// Return the resultString to the Task level
return resultString;