Are there any existing Macros to find any and all live Dynamic Dimensions and turn them off? I work for a sign company that requires I work with multiple pages with multiple elevations at multiple scales. I have my dimensions set to be automatically off (not dynamic) after I use them, so when a client requires an increase in the size of the sign all I have to do is turn them back on, increase the size and then turn them back off. This system works most of the time, however mistakes happen and sometimes I forget to turn the Dynamic Dimensions off and thus when I change the global scale on a separate elevation that one dimension would then be wrong.
This is why I would love a macro that could check my entire document, and flag all the still live dynamic dimensions. Another option would be a macro that automatically turns of all dynamic dimensions when pressed. I would then use this system page by page. I understand there are similar macros that will automatically break dimensions apart, however if at all possible I would love to just keep them live but still in the off position.
Obviously the perfect solution would be for Corel to let users set the scale per page, but seeing how people have been asking for this for 7+ years... I don't even get my hopes up for that anymore.
For stability I use X6, However I do use and have access to CorelDraw 18 as well.
This is my first time posting on the forum, so thank you to everyone who has helped me solve a problem in the past!
Mek said:Thank you, check update in my last post. if possilbe check in x7 or higher to confirm compatibility. Thanks.
That works for me in 2018, Mek.
Using .SetProperty is more elegant than my "pushing the button" by using .InvokeItem. Nice!
I will try some time to see if I can use that method to work with some other dimension properties where the API doesn't work correctly in newer versions.
Thank you.
Nice thing is that goal is reached and we showed two ways how to do it.
I like Mek's use of .SetProperties as a more elegant workaround than what I had used (using InvokeItem to "press the button" to toggle the status of selected dynamic text). Doing it with .SetProperties lets me use a CommandGroup so that multiple operations performed by the macro show up as a single entry in the Undo list.
I reworked my code to use the .SetProperties approach, and put it into a function:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
Function set_dim_dynamic_status(ByRef DimensionShape As Shape, ByVal DynamicStatus As Boolean) As Long On Error GoTo ErrHandler If Not DimensionShape.Dimension.DynamicText = DynamicStatus Then 'try to set the status DimensionShape.Style.GetProperty("dimension").SetProperty "dynamicText", DynamicStatus 'check the status If DimensionShape.Dimension.DynamicText = DynamicStatus Then 'successful set_dim_dynamic_status = 1 Else 'not successful set_dim_dynamic_status = -1 End If Else 'property already has the desired status set_dim_dynamic_status = -2 End If ExitFunc: Exit Function ErrHandler: MsgBox "Error occurred: " & Err.Description & vbCrLf & vbCrLf & "set_dim_dynamic_status()", vbCritical Resume ExitFunc End Function
Here's a link to my latest offering for this:
JQ_dynamic_dims_2019_08_24_2145.zip.
I've added some subs to cover things more comprehensively. Any of those subs can be put on a toolbar or menu, or have a keyboard shortcut assigned to it, by using regular CorelDRAW workspace customization.
For the sort of work you describe, I would guess that the three subs I highlighted in that screenshot would be the most useful.
The sub to make all dimensions dynamic on all pages is one that you might never want to use!
I tested this in the crap version 2019 Trial (with update 2) and your GMS Macro WORKS!!!!! At least something works correctly in v2019! ; ) THANK YOU Mek
I will test in v2017 soon... I am sure it will work.
Thank you again... VERY USEFUL!!!!!
WORKS IN THE WORKING VERSION 2017!!!!