Good Day All.
I need to regularly draw an inside contour in a rectangle that has different spacing on at least 3 of the 4 sides. Also needs to be on a separate layer.
For instance, in a 48 inch wide by 36 inch high box I need an inner contour with 8.5" bottom, 12" top, 4" left and 6" right spacing. I can do the math and work it all out but chances are that when doing 50 different ones, I will make at least one mistake. Likely 2 or 3. Since these are for parts that will be CNC cut and sent out, an error is expensive.
What are my best options for this? If it's a macro, where do I find a place that can write one for me?
Thanks in advance.
Myron said:A macro can create a rectangle according to your set size of 36 x 48 , the instructions wouldn't work for another rectangle of different dimensions.
I am thinking of a VBA form with textboxes for entering the top, bottom, left, and right inset distances, and a commandbutton for "create inset rectangle".
Select the target rectangle or rectangles, then click the button.
Dropout said:Sounds perfect - how do I do it?
I could look at it this evening.
I'm no expert at macros in CorelDraw, but I think this falls within my limited skill set, and I did something closely related to this a while back.
OK, here's something to look at.
Rectangles before:
Rectangles after:
Here' s the .GMS file:
inset_rectangles_v2.gms
As it sits now, I've made no attempt to make it handle rotated rectangles correctly.
Save
Good job Eskimo! Perhaps you could take a look here. See my macro gibberish at the end, Ideally one could hit the macro and input a value to adjust the contour then apply. Also couldn't figure out how to incorporate the "MyContour" into just the "AutoTrim" macro instead of using the Call function.
Had to add this code to the macro for my use.[:D]
ActiveDocument.Unit = cdrInch