Page 1 of 1

Grouping objects

Posted: Mon Nov 27, 2017 12:53 am
by Vince
Good day

Is it possible to have several Objects in one section of a Model ? For example, I would like to create a Ball Mill Tool which is basically made of several parts: a sphere, a cone and a cylinder, all of which may have different colors.

I have found how to DeleteChild, but I cannot relate in the samples how to AddChild.

Any suggestion ?

Thanks

Re: Grouping objects

Posted: Tue Nov 28, 2017 12:35 am
by Prashant Kande
Hi Vince

You need to use IArray queried form the section where you would like to add the child. See ButtonAdd_Click() in Samples\NET\VB\ObjArray\ObjArrayForm.vb. Children move with the parent as if it was a single object. Some operation also treat children as if it was a single object
The code there:

Code: Select all

If Not m_iSectCur Is Nothing Then
            iArray = m_iSectCur
        Else
            iArray = m_iModel
        End If

        iArray.Add(iSect)
 m_iSectCur can be any section
Regards