Wayne, I just want to point out for you and others coming to this thread that using ClearFiles is quite heavy-handed.
A better way is to also get all of the Trimble.Vce.Data.FileProperties snap-ins as well as all the snap-ins named only with their serial numbers that are of type Trimble.Vce.Core.Components.ImportSelection. The file properties and import selection objects match where the import selection serial number is 1 greater than the file properties serial number. There may be another object that matches them already, but I haven't found it yet. Next, match the file names in the ImportInformation object to the FileProperties / ImportSelection pairs and only remove the ImportInformation entries that have no match.
Note that this is closely related to Selection Sets too (another family of related objects!), which is something I am working on now.
------------------------------
David Brubacher
------------------------------
Original Message:
Sent: 04-08-2025 04:28
From: Wayne Welshans
Subject: Cleaning up the Import Summary Report
Awesome! This is a constant pain point for me, most of our projects last several years and I end up importing hundreds or thousands of files by the end of it and that import summary gets ridiculous long.
------------------------------
Wayne Welshans
Original Message:
Sent: 04-02-2025 18:08
From: David Brubacher
Subject: Cleaning up the Import Summary Report
I ran into a problem recently where my import summary had grown to 100s of files because I was building new templates, feature libraries - everything. Lots of testing needed, which included deleting imported JOB files, adjusting a few things and trying again. And again. And again.
Creating a template from the file did not clear the file list, nor did I find a built-in way to do it. My dealer didn't have an answer either.
After lots of time roaming the API, I found it. This is C# code but not hard to figure out. I left the namespace on the important object, found in Trimble.Sdk.Data. It's a snap-in, so you have to find it and cast it to the correct type.
private void ClearImportSummaryFiles() { foreach (ISnapIn snapIn in Project) { if (!(snapIn is Trimble.Vce.Data.ImportInformation importInformation)) continue; importInformation.ClearFiles(); } }
I'm doing this in the template, so there's no danger of removing needed files. If you have an FXL in your template it stays in the Imported Files list.
------------------------------
David Brubacher
------------------------------