DG7.1 Open STL without

KernelCAD with Native Visual Basic
Post Reply
juergen
Posts: 6
Joined: Wed Jan 10, 2024 9:35 am

DG7.1 Open STL without

Post by juergen »

Hello Together,

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
Thanks

Prashant Kande
Posts: 121
Joined: Mon Apr 04, 2016 4:55 am

Re: DG7.1 Open STL without

Post by Prashant Kande »

Hello Juergen
Sorry, you have found an old bug. We are preparing an update. It should be out tomorrow.
Thanks for reporting

Prashant Kande
Posts: 121
Joined: Mon Apr 04, 2016 4:55 am

Re: DG7.1 Open STL without

Post by Prashant Kande »

Juergen,
please get the 5397 update: Downloads
Your code should disable the dialogue now.
Thanks for reporting.

juergen
Posts: 6
Joined: Wed Jan 10, 2024 9:35 am

Re: DG7.1 Open STL without

Post by juergen »

Hello Prasant Kande,

Thanks for your quick response and providing the prepared update
Unfortunately it still does not work.
I have made sure that I have installed the correct DG Kernel 7.1(5397).
I also checked the registration of the components.
I have compared the Delphi, C-Sharp and C codes.
Something still does not fit.
The included C-Sharp and VB samples still show the same error.
I also can't find anything in the definition at "ISTLDataContext_DG" about "Verbose".

Code: Select all

Namespace DGKC
    Public Interface ISTLDataContext_DG
        Implements IUnk

        Property Binary As Boolean
        Property SeparateObjects As Boolean
        Property CreaseAngle As Double
        Property BuildTree As Boolean
        Property AnalysisType As STLAnalysisType_DG
    End Interface
End Namespace
Perhaps it will be helpful?

Thanks

Juergen

Prashant Kande
Posts: 121
Joined: Mon Apr 04, 2016 4:55 am

Re: DG7.1 Open STL without

Post by Prashant Kande »

Sorry, Juergen

We have rebuilt the update. There was a problem with the release building procedure after upgrading the computer.

It would be good to do a quick retest with the latest update 5399 or later. It might fix it.

We will dig deeper if it does not work. The problem has to be fixed.

Thank you.

juergen
Posts: 6
Joined: Wed Jan 10, 2024 9:35 am

Re: DG7.1 Open STL without

Post by juergen »

Hello Prasant Kande,

Now it works.
Thank you.

Post Reply