SaveasFlatDXF not working on SE ST9 MP2

Valued Contributor
Valued Contributor

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?

 

Best Regards

Ramon Ruiz

8 REPLIES

Re: SaveasFlatDXF not working on SE ST9 MP2

Siemens Phenom Siemens Phenom
Siemens Phenom

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.

Re: SaveasFlatDXF not working on SE ST9 MP2

Valued Contributor
Valued Contributor

The macro is the one included in the Solidedge.Community Repository that Jason Newell developed. This is the link

 

https://github.com/SolidEdgeCommunity/Samples/tree/master/SheetMetal/SaveAsFlatDXF

 

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.

 

Best regards

Ramon Ruiz

Re: SaveasFlatDXF not working on SE ST9 MP2

Siemens Phenom Siemens Phenom
Siemens Phenom

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:

 

https://github.com/SolidEdgeCommunity/Samples/issues

 

Or post your question in the Solid Edge Developer Forum:

 

http://community.plm.automation.siemens.com/t5/Solid-Edge-Developer-Forum/bd-p/SEDeveloperForum

 

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.

Re: SaveasFlatDXF not working on SE ST9 MP2

Valued Contributor
Valued Contributor

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.

 

 

Re: SaveasFlatDXF not working on SE ST9 MP2

Siemens Phenom Siemens Phenom
Siemens Phenom

My bad -- you are writing in the Developer forum.  Sorry!  Smiley Embarassed

Re: SaveasFlatDXF not working on SE ST9 MP2

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

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.

sesscfl.png

Can you provide a sample PSM that it does not work on?

Jason Newell
Applications Architect
www.jasonnewell.net

Re: SaveasFlatDXF not working on SE ST9 MP2

Valued Contributor
Valued Contributor

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

 

Best Regards

Ramon Ruiz

Re: SaveasFlatDXF not working on SE ST9 MP2

Valued Contributor
Valued Contributor

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.

 

Best regards

Ramon Ruiz