Problem:
I am trying to load STL files and want to avoid the "STL Import Option" dialog.
It looks as if the example from DataFlow does not work.
Loading STL files works, but the dialog cannot be suppressed
Can you explain how to bypass the dialog to automatically load stl files?
Code: Select all
Private Sub OnSTLDirectoryLoad(sender As Object, e As EventArgs) Handles menuSTLDirLoad.Click
Dim dlg As FolderBrowserDialog = New FolderBrowserDialog()
' Start from path of the current model.
dlg.SelectedPath = GetCurPath()
dlg.ShowNewFolderButton = False
If dlg.ShowDialog() <> DialogResult.OK Then Return
Dim options As IDictionary_DG = m_gen.Create(Of IDictionary_DG)()
' See also OnSaveAs()
options.SetBool("Verbose", False) ' Do not show any messages from component
options.SetBool("SeparateObjects", True)
options.SetBool("BuildTree", menuSTLOptionsTree.Checked)
' When true will read only files in the selected
' folder. All of them will become the top level objects
' without any children
m_iModel.Load(dlg.SelectedPath, options)
m_dgkc.UpdateView()
End Sub