Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set ProjectIdEvent with FileId #368

Merged
merged 1 commit into from
Nov 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Excel_UI/Caller/CallerFormula_Run.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;

Expand All @@ -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
});
}
}
Expand Down