From 5222b2ffa177bd7eff261f56d52cab1afd336a96 Mon Sep 17 00:00:00 2001 From: travispotterBH Date: Tue, 8 Nov 2022 13:27:28 -0500 Subject: [PATCH] Update CallerFormula_Run.cs --- Excel_UI/Caller/CallerFormula_Run.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Excel_UI/Caller/CallerFormula_Run.cs b/Excel_UI/Caller/CallerFormula_Run.cs index 06b799d..e4ee38f 100644 --- a/Excel_UI/Caller/CallerFormula_Run.cs +++ b/Excel_UI/Caller/CallerFormula_Run.cs @@ -58,7 +58,7 @@ public virtual object Run(object[] inputs) // Log usage Application app = ExcelDnaUtil.Application as Application; Workbook workbook = app.ActiveWorkbook; - SetProjectID(workbook); + SetProjectID(workbook, AddIn.WorkbookId(workbook)); Engine.UI.Compute.LogUsage("Excel", app?.Version, InstanceId, Caller.GetType().Name, Caller.SelectedItem, Engine.Base.Query.CurrentEvents(), AddIn.WorkbookId(workbook), workbook.FullName); // Return result @@ -84,7 +84,7 @@ public virtual object RunWithOutputConfig(object[] inputs, bool includeOutputNam /*******************************************/ - private static void SetProjectID(Workbook workbook) + private static void SetProjectID(Workbook workbook, string fileID) { string projectId = workbook.Title; @@ -93,7 +93,8 @@ private static void SetProjectID(Workbook workbook) BH.Engine.Base.Compute.RecordEvent(new ProjectIDEvent { Message = "The project ID for this file is now set to " + projectId, - ProjectID = projectId + ProjectID = projectId, + FileID = fileID }); } }