Hello, just received a new task: group elements in selection set as Named group if they don't have a property of Color "1".
I've made my template which looks logical to me, but still it does not group elements:
Public Sub TestGroupSelectionSetC() Dim myElement As Element Dim myElemEnum As ElementEnumerator Dim myGroup As NamedGroupElement Set myGroup = ActiveModelReference.GetNamedGroup("GroupA") Dim OElement As NamedGroupMember Set myElemEnum = ActiveModelReference.GetSelectedElements Do While myElemEnum.MoveNext Set myElement = myElemEnum.Current If Not myElement.Color = 1 Then Set OElement = myGroup.AddMember(myElement) End If Loop End Sub
Please advice, I'm novice in VBA.
Thanks is advance !