脚本块示例 – 蓝色读取
要运行以下示例,请右键单击脚本块,然后单击重新配置脚本 I/O。这将打开脚本定义编辑器窗口,在此将返回类型设置为字符串。
编写示例代码并运行脚本。
复制
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;