# Script Block Examples – Blue Locate

This topic contains sample code that stores the position of first feature of view.

var blueMarking = sample.Markings["Find Screw"] as ViDi2.IBlueMarking;
var view = blueMarking.Views.First();
return view.Features.First().Position.ToString();

Here is the another sample script for Blue Locate.

var markings = $Tasks.Task.DeepLearningRuntimeBlock.Sample.Markings["localize"] as IBlueMarking;

var position = markings.Views.First().Features.First().Position.ToString();

return position;

- Convert Runtime Block's Sample object to an IBlueMarking object.
var markings = $Tasks.Task.DeepLearningRuntimeBlock.Sample.Markings["localize"] as IBlueMarking;
- Get position of the first Feature to be found.
var position = markings.Views.First().Features.First().Position.ToString();
- OPTIONAL: get position of Model Match
var position = markings.Views.First().Matches.First().Position.ToString();
- return position to Task
return position;