I noticed errors in my logging and I tracked it down to how SolidWorks handles 3D interconnect.
When SolidWorks opens a STEP assembly with 3D Interconnect, the path is assembly.step.sldasm. This file does not exist. They might be using a temp file somewhere, but there is no trace of that.
The issue is that we have:
Model.HasBeenSaved => !string.IsNullOrEmpty(FilePath);
This is no longer true, starting with SW2020.
We might have to check if the file exists, if the path includes an extension that is supported by interconnect and/or if interconnect is enabled. I'll do some more digging.
3D Interconnect was introduced in 2017, back then it only supported native files for Catia, AutoCAD and a few others. In 2018 they added support for universal formats like STEP and IGES:
2017
2018
The API is very empty up to 2020 regarding 3D Interconnect. In 2020 they added a way to check if 3D Interconnect is used, by adding a Feature property:
https://help.solidworks.com/2020/english/api/sldworksapi/solidworks.interop.sldworks~solidworks.interop.sldworks.ifeature~is3dinterconnectfeature.html
This property is true for the second feature in a step assembly, a component.
I noticed errors in my logging and I tracked it down to how SolidWorks handles 3D interconnect.
When SolidWorks opens a STEP assembly with 3D Interconnect, the path is assembly.step.sldasm. This file does not exist. They might be using a temp file somewhere, but there is no trace of that.
The issue is that we have:
Model.HasBeenSaved => !string.IsNullOrEmpty(FilePath);
This is no longer true, starting with SW2020.
We might have to check if the file exists, if the path includes an extension that is supported by interconnect and/or if interconnect is enabled. I'll do some more digging.
3D Interconnect was introduced in 2017, back then it only supported native files for Catia, AutoCAD and a few others. In 2018 they added support for universal formats like STEP and IGES:
2017
2018
The API is very empty up to 2020 regarding 3D Interconnect. In 2020 they added a way to check if 3D Interconnect is used, by adding a Feature property:
https://help.solidworks.com/2020/english/api/sldworksapi/solidworks.interop.sldworks~solidworks.interop.sldworks.ifeature~is3dinterconnectfeature.html
This property is true for the second feature in a step assembly, a component.