.STL file lost after .STP export

.STL file lost after .STP export

Daan_M
Collaborator Collaborator
175 Views
1 Reply
Message 1 of 2

.STL file lost after .STP export

Daan_M
Collaborator
Collaborator

Hi,

 

After exporting an assembly with a .STL file inside to .STP, and opening the .STP again, the .STL file isn't there.

Save size is also 10kb, so something is going wrong.

 

The code is my assembly (simplified) is;

 

Sub Main() 

Dim oDoc As AssemblyDocument = ThisDoc.Document
Dim oACD As AssemblyComponentDefinition = oDoc.ComponentDefinition

Dim oMatrix As Matrix
oMatrix = ThisApplication.TransientGeometry.CreateMatrix
oMatrix.SetTranslation(ThisApplication.TransientGeometry.CreateVector(0,0,0))

oACD.Occurrences.Add("file.stl", oMatrix)

Dim StepName As String = "Name"
Dim SavePath As String = "Path\"
Dim TempFile As String = SavePath &  StepName & ".stp"

ThisDoc.Document.SaveAs(TempFile, True)

 

 

Any ideas?

 

0 Likes
176 Views
1 Reply
Reply (1)
Message 2 of 2

Daan_M
Collaborator
Collaborator

Addition, doing the export manually by file -> Export -> Different Cad Format -> STP also results in an empty file.

 

File in question attached.

0 Likes