I tried to us SaveAsFlaDXF macro in Solideedge.Community Samples but it´s not working. The DXF file is empty. I tried to change SaveAsFlatDXFEx for SaveAsFlatDXF with the same result.
May you confirm the problem with the methods? Maybe we have to report it back to Siemens?
If this macro is part of the distributed Solid Edge software, then any issues should be reported to Siemens. If there are issues with sample code that is from other sources such as this forum, the Solid Edge GitHub Community, etc., then those issues need to be reported to the owners of those resources.
Perhaps you can provide an explicit link of where you got this macro from and we can better direct you to whom is responsible for resolving issues with that macro.
The macro is the one included in the Solidedge.Community Repository that Jason Newell developed. This is the link
I think the problem is not with the macro but with the Solid Edge API, the methods create an empty dxf while when you run the command inside solid edge the dxf is right with all geometry.
As this is not core Solid Edge code, I would suggest you first start by either submitting an issue to the Solid Edge Community GitHub site:
Or post your question in the Solid Edge Developer Forum:
If you think there is an actual API issue then if you provide a simplified piece of code that reproduces the issue to GTAC, then Siemens can review but your starting point should be with the group responsible for the sample code.
I thought I was writing on the Developer Forum.
I will try to report the error to the community too
I linked to the actual piece of code that reproduces the error. It is a small piece of code.
The code was ported from a legacy sample. I just ran it against "C:\Program Files\Solid Edge ST9\Training\sesscfl.psm" on my machine and saved the DXF to the desktop. Below is a screenshot of the result. It appears to work on this file.
Can you provide a sample PSM that it does not work on?
The macro works with that file, but when you try to use it on this
C:\Program Files\Solid Edge ST9\Training\chassis.psm it doesn´t work, if the flatpattern is not present Solid Edge warns you, that´s ok, but when you make a flatpattern the dxf is empty
C:\Program Files\Solid Edge ST9\Training\foot1.psm , same problem
C:\Program Files\Solid Edge ST9\Training\Heater plate.psm , same problem
C:\Program Files\Solid Edge ST9\Training\sessbsn.psm , same problem too
I guess maybe the problem is not with the method but with the chosen face the macro selects to flatten, although the macro is creating an empty dxf with the flatpattern made so no need to flaten anything
Ok these are my findings. The problem is with the selection of the face and edge. If the flatpattern is present and I set body=nothing , faces=nothing , edge=nothing the dxf generated contains the geometry needed.
I think the problem is with the face used to flatten the part, you can´t unfold the sheet using any face, I think the face should be perpendicular to the width of the sheet.