C# Autodesk Forge library generates "Source File" attribute for every element

Viewed 17

We need to compare 2 versions of the same model in Autodesk Forge web viewer. Both 2D and 3D models, and in different formats (IFC, DWG, Revit, ...). The DiffTool extension works mostly fine, but there is a problem.

We are using the Autodesk.Forge C# library based on this example, but it is generating a "Source File" attribute for every element in the model. "Source File" attribute is generated for every element in the model

This then is marked as change in every element during the comparison, which is not wanted. Elements are marked as modified because of the "Source File" attribute

I managed to track down where the attribute is coming from, and it is this line, namely the second attribute of the UploadObjectAsync function:

          uploadedObj = await objects.UploadObjectAsync(input.bucketKey,
/* here -> */ Path.GetFileName(input.fileToUpload.FileName), (int)streamReader.BaseStream.Length, streamReader.BaseStream,
              "application/octet-stream");

I tried to override the parameter and set it to a fixed value. That way, the "Source File" attribute would be the same and would not show as a change. But that didn't work, since the attribute is "object id", setting it to a same value as a previous model caused the new model to override the old. So even if I used the old URN, I would see the new model.

So, is there any way to solve it? Do I have abandon this C# library and do the REST API calls manually with curl or something? How to solve this?

1 Answers

This is nothing related to the .NET (C#) client SDK. If you submit the translation job with the direct REST API calls to Forge Model Derivative API or other client API written in different programming languages, you will still see the same property shown for IFC files.

Are you loading this model in the SVF2 format? It looks like a known issue, LMV-6829, was logged by our engineering team and reported by my colleague Petr. Our engineering team is investigating the possible solution for the Diff extension. Sorry for the inconvenience!

Related