Skip to content

Commit

Permalink
add one more column urn derivative
Browse files Browse the repository at this point in the history
  • Loading branch information
chuongmep committed Feb 28, 2024
1 parent eef2fa7 commit e65e02b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions APSToolkit/BIM360/BIM360.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1756,6 +1756,7 @@ public DataTable BatchReportItemVersion(string projectId, string folderId,string
dataTable.Columns.Add("ItemName", typeof(string));
dataTable.Columns.Add("ItemId", typeof(string));
dataTable.Columns.Add("LatestVersion", typeof(long));
dataTable.Columns.Add("LatestURN", typeof(string));
BatchReportItemVersionRecursive(projectId, folderId,extenstion,ref dataTable,isRecursive);
return dataTable;
}
Expand All @@ -1777,12 +1778,14 @@ private void BatchReportItemVersionRecursive(string projectId,string folderId,st
string fileName = item?.attributes.displayName;
long versionNumber = item?.attributes.versionNumber;
string itemId = item?.relationships.item.data.id;
string urn = item?.relationships.derivatives.data.id;
DataRow row = dt.NewRow();
row["ProjectId"] = projectId;
row["FolderId"] = folderId;
row["ItemName"] = fileName??string.Empty;
row["ItemId"] = itemId??string.Empty;
row["LatestVersion"] = versionNumber;
row["LatestURN"] = urn??string.Empty;
dt.Rows.Add(row);
}
else if (itemInfo.Value.type == "folders" && isRecursive)
Expand Down
1 change: 1 addition & 0 deletions APSToolkitUnit/BIM360Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ public void TestBatchExportAllRevitToExcelByFolder(string projectId,string folde

[Test]
[TestCase("b.1f7aa830-c6ef-48be-8a2d-bd554779e74b","urn:adsk.wipprod:fs.folder:co.dEsE_6gCT6q0Kz7cRSGx0w")]
// [TestCase("b.ec0f8261-aeca-4ab9-a1a5-5845f952b17d","urn:adsk.wipprod:fs.folder:co.OyLhAc9PSoymP-_yAb3YoQ")]
public void BatchReportItemVersionTest(string projectId,string folderId)
{
BIM360 bim360 = new BIM360();
Expand Down

0 comments on commit e65e02b

Please sign in to comment.