I need Help. I have been researching and Cannot Figure out how to produce an attribute I want to add to my Macro I've been working on.
I am looking for a Macro or Code I can run that will make a selection of each (or all) of these 3 Options. Count how many "corners, sides, or middles" there are for each and display the value in a Msgbox for me.
Example: Pretend I pushed a command button and it counted these for me and displayed values in a msgbox!
1. Corners (red) = 30
2. Sides (green) = 10
3. Middle (blue) = 20
or
I click command button - it counts all three sides and displays each in text box...
1. Corners (red) = 30 (shows in textbox1)
2. Sides (green) = 10 (shows in textbox2)
3. Middle (blue) = 20 (shows in textbox1)
My goals is to eventually "search all corners,sides, middles and have that value automatically show in my ' textbox" so i dont have to type it in! But right now the prompt message will suffice.
Here is my macro I've been working on. It works fairly good so far!! I just need a little help with one of the two options above!
Note: I do have the "find" option. But because my templates are grouped and easy to move around that way, I'd like to keep them grouped. I dont want to have to ungroup everything on the page to get a count of all my "reds" then all my 'blues" then my greens and be forced to group all my sides back together. I created a video but i seriously cannot get the size down... So im left w/print screens.
My Macro Generates the Columns already. That works fine. I just want an easier way to count the each of the three tiles on the page.
You can see the video Here. I couldn't figure out a way to make the video small enough to Upload.
Modular Tiles Macro from chieri thompson on Vimeo.
On the subject of CQL (Corel Query Language) you may find this article in the SDK Tutorials useful: Using Corel Query Language (CQL) to Search for Objects in CorelDRAW and Corel DESIGNER Documents
Joe,
There are a couple of ways you can do this. Here is one to get you started.
Sub ActiveShapeCQL() Dim s As Shape Set s = ActiveShape ActivePage.Shapes.FindShapes(Query:="@fill.color='" & s.Fill.UniformColor.ToString & "'").CreateSelection End Sub
-Shelby