Grouping objects

Technical discussions
Post Reply
Vince
Posts: 4
Joined: Wed Oct 04, 2017 7:36 am

Grouping objects

Post 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

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

Re: Grouping objects

Post 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

Post Reply