Hi folks,
Since I dipped my toe in the CQL pool I've loved how much easy it is to make selections, but I've run into a problem finding named symbols that are within groups.
I'm not certain if I was just lucky and my usage case had most of these other items outside of groups, or if this is particular to symbols.
In this example, I have two doors. Each is a separate group and with-in that group is a symbol named "Lock".
Dim cmdRange As ShapeRange Dim objText As String objText = "Lock" Set cmdRange = ActivePage.Shapes.FindShapes(Query:="@name.contains('" & objText & "')") MsgBox ("Found " & cmdRange.count & " entries for " & objText)
Dim cmdRange As ShapeRange
Dim objText As String
objText = "Lock"
Set cmdRange = ActivePage.Shapes.FindShapes(Query:="@name.contains('" & objText & "')")
MsgBox ("Found " & cmdRange.count & " entries for " & objText)
On my machine using Coreldraw 2020 this returns no entries, but if I move the lock symbols outside the group everything works as expected.
Is this working as expected, or do I need to do something to specify searching within groups as well?
perhaps
ActiveDocument.ActiveLayer.Shapes.All.Show
I tested your macro on CDx8.I created a group within a group that contained two shapes named "Lock" and an additional two shapes ("Lock") separately on a layer.So your tapeSet cmdRange = ActivePage.Shapes.FindShapes(Query:="@name.contains('" & objText & "')")and alternativeSet cmdRange = ActivePage.Shapes.FindShapes(Name:=objText)find four figures as it should be