Hi
I am completely new to the software.
I need to add an object from an .stl file to my model I built. Is there a quick way to do that?
I am using dgk 7.1 with VB in Visual Studio 2022
Thank you
Loading second model
-
- Posts: 65
- Joined: Tue Jun 18, 2024 6:12 am
Re: Loading second model
Hello
Sure.
You need to create another model, load the file and add the entities you need to the main (control's) model.
This is a snippet from VB\KernCADLib\ModelManager.vb used in DataFlow sample. Try debugging it first to see if it works for your file.
Regards
Sure.
You need to create another model, load the file and add the entities you need to the main (control's) model.
Code: Select all
Dim iModelStandalone As IModel_DG = gen.Create(Of IModel_DG)
iModelStandalone.Load(path)
Dim iEntArray As IEntityArray_DG = iModelStandalone.GetEntityArray(False)
Dim iModel As IModel_DG = m_dgkc.GetModel() 'The main one
iModel.Add(iEntArray, -1)
Regards