Is there a macro that searches for and displays all active dimension objects? all pages?
cscartdept said:Is there a macro that searches for and displays all active dimension objects? all pages?
Could you clarify what you mean by, "displays all active dimension objects"?
I want to find all dims and see if any and how many. does not work in the 'find' tool..WTH??
https://drive.google.com/open?id=1OtYz-XrruPIs-LpLffr2RPKOdCUvsJ8n
Here is a macro that lets you "walk through" all of the dimensions on the page, selecting each one in turn:
JQ_Sequentially_Select_Dimensions_2018_08_06_1657.zip.
It looks like this:
VIDEO: Sequentially Select Dimensions demo 01
.
Nice. Anyway to .Show modeless so that I can change pages and check for dimensions?
Here's one that is still modal, but allows navigation to different pages. It does its thing for the current page immediately after being launched, and again every time a page change takes place. No more messageboxes, as it shows the number of dimensions in a textbox.
The .GMS file: JQ_Sequentially_Select_Dimensions_2018_08_06_2332.zip.
Short video of it in use:
VIDEO: Sequentially Select Dimensions demo 02
Very cool. Thanks again Eskimo!!
Based on some work I did recently for a "zoom to selection" thing, I could easily modify the macro shown above to zoom in to each dimension as it is selected. That might be useful if one were using this to visually inspect dimensions on a large drawing.
...or set the outline color to red so it stands out.
That would be an easy thing to do - just select all of the dimensions on the page and change the color.
What is suitable really depends on the details of what you want to accomplish and what content you are working with. The "definition of problem" thing can be the most difficult part of an automation project!
After thinking about this a bit more, here is something substantially different.
The big difference with this version is that the form is modeless, which opens up a lot of possibilities, because all of the regular CorelDRAW tools for navigation and editing can be used. It's not just for inspection now; a dimension can be edited without closing the macro. Finish editing, and the "previous" and "next" buttons still work as they should.
If a dimension is deleted, then the next attempt to select the next/previous dimension will result in the display of a message indicating that, after which the macro will refresh its information for the page.
If dimensions are added, then the "Refresh" button can be used to reset the ShapeRange of dimensions on the page.
For closer inspection and editing, one might find it convenient to use "Zoom to Selected", and then "Zoom to Page" to bounce back to a full page view. I will put in a shameless plug here for my own "Zoom to Selection Plus" that can do both of those with a bit more nuance than the standard CorelDRAW commands.
The form is automatically updated on every page change.
Here's how it looks:
VIDEO: Sequentially Select Dimensions demo 03.
Here's the .GMS file:
JQ_Sequentially_Select_Dimensions_2018_08_08_2237.zip.