Hello to all,
i´ve grouped some shapes to a shaperange and
some other shapes to another shaperange using VBA
How to group these two ShapeRages?
Thanks a lot
I may not understand correctly what you want to do.
If you want to add the members of one ShapeRange to another ShapeRange, then you might look at the ShapeRange.AddRange method.
Thanks for the Help!
But it is not succesful
My Shapes Ranges both contains different Type of Shapes, mainly Lines and Circles and Text. So, i need something like
Dim sr1, sr2, sr_complete as ShapeRange
sr_Complete = sr1 + sr2
dim sr_Complete as New ShapeRange
sorry, still doesn´t work. So please see my code..
Dim s1 As Shape Dim sGroup As Shape Dim sr1 As New ShapeRange Dim sr2 As New ShapeRange Dim sr_G As New ShapeRange
For i = LBound(pkx) To UBound(pkx) Set s1 = ActiveLayer.CreateEllipse2(pkx(i), pky(i), 0.05, 0.05) s1.Fill.ApplyNoFill s1.Outline.SetPropertiesEx 0.1, OutlineStyles(0), CreateCMYKColor(0, 0, 0, 100), ArrowHeads(0), ArrowHeads(0), cdrFalse, cdrFalse, cdrOutlineButtLineCaps, cdrOutlineMiterLineJoin, 0#, 100, MiterLimit:=5#, Justification:=cdrOutlineJustificationMiddle sr1.Add s1 Next
If tbNum.Value = True ThenSet s1 = ActiveLayer.CreateArtisticText(prx(i), pry(i) - 7, vtxt) ' & " m") s1.Stretch 2.5 s1.Fill.UniformColor.CMYKAssign 0, 0, 0, 100 s1.Outline.SetNoOutline sr2.Add s1 End If
'Finish with "Making Shapes"
'Now group sr1 and sr2
'and Group sr1 + sr2 to sr_G
' Set sGroup = sr.Group sr_G.AddRange sr1 ' Set sGroup = sr2.Group sr_G.AddRange sr2
Thanks for your patience ;-)DC
I am sure that you know exactly what you want to accomplish - but I am still not sure that I know what that is.
I don't think the answer is difficult, but I want to be sure that I understand the question.