Message 1 of 2
.STL file lost after .STP export
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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?