fix SoftNcRunner GM code normalization.
This commit is contained in:
@@ -156,6 +156,7 @@ execute NC files, and properly manage project resources using
|
||||
using Hi.Common.Messages;
|
||||
using Hi.HiNcKits;
|
||||
using Hi.MachiningProcs;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
@@ -175,7 +176,8 @@ public static class DemoUseMachiningProject
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
LocalApp.AppBegin();
|
||||
using var loggerFactory = Microsoft.Extensions.Logging.LoggerFactory.Create(b => b.AddConsole());
|
||||
LocalApp.AppBegin(loggerFactory.CreateLogger("Hi.Sample"));
|
||||
LocalProjectService localProjectService = new LocalProjectService();
|
||||
|
||||
#region ProjectLoading
|
||||
@@ -202,10 +204,10 @@ public static class DemoUseMachiningProject
|
||||
};
|
||||
Console.WriteLine($"Set machining step event.");
|
||||
//show MRR.
|
||||
localProjectService.RuntimeApi.MachiningStepBuilt += (preStep, curStep) =>
|
||||
localProjectService.RuntimeApi.SessionStepBuilt += (preStep, curStep) =>
|
||||
{
|
||||
var sourceCommand = curStep.SourceCommand;
|
||||
var indexedFileLine=sourceCommand?.GetSentence()?.IndexedFileLine;
|
||||
var indexedFileLine=sourceCommand?.GetSentence()?.FirstIndexedFileLine;
|
||||
if (curStep.Mrr_mm3ds > 500) //show only the step that contains large MRR.
|
||||
Console.WriteLine($"MRR = {curStep.Mrr_mm3ds} At \"{indexedFileLine?.FilePath}\" (Line {indexedFileLine?.GetLineNo()}) \"{indexedFileLine?.Line}\"");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user