• I want to thank all the members that have upgraded your accounts. I truly appreciate your support of the site monetarily. Supporting the site keeps this site up and running as a lot of work daily goes on behind the scenes. Click to Support Signs101 ...

Just a little list of some of my Corel X7 Macros. Some are tests that I never finished or just testing code.

myront

CorelDRAW is best
macro list.png
 

White Haus

Not a Newbie
I think I saw somewhere on your list something along the lines of quickdimensions? Is that something that can be purchased?

I've spent so much time sending proofs with tons of specs and dimensions over the last month and absolutely hate the coreldraw dimension tool settings. (You'd think I'd get faster/better at using it, but no, just more annoyed)
 

myront

CorelDRAW is best
I think I saw somewhere on your list something along the lines of quickdimensions? Is that something that can be purchased?

I've spent so much time sending proofs with tons of specs and dimensions over the last month and absolutely hate the coreldraw dimension tool settings. (You'd think I'd get faster/better at using it, but no, just more annoyed)
I assigned the letter d to QuickDimensions macro. Select a shape then hit d. You'll have to set your defaults as you like them to be. Another thing to keep in mind is that these dimensions aren't "married" to the shape (I forget the proper terminology). That means when you resize a shape afterward you'll have to adjust them manually.

Sub QuickDimensions()
Dim srSelection As ShapeRange
Dim x As Double, y As Double, w As Double, h As Double
Dim Spt1 As SnapPoint, sPt2 As SnapPoint
Dim s As Shape

Optimization = True
ActiveDocument.BeginCommandGroup "Quick Dimensions"
EventsEnabled = False
ActiveDocument.SaveSettings
ActiveDocument.PreserveSelection = False
On Error GoTo ErrHandler

Set srSelection = ActiveSelectionRange
srSelection.GetBoundingBox x, y, w, h
Set Spt1 = CreateSnapPoint(x, y + h)
Set sPt2 = CreateSnapPoint(x + w, y + h)
Set s = ActiveLayer.CreateLinearDimension(cdrDimensionHorizontal, Spt1, sPt2, True, , , cdrDimensionStyleFractional, Units:=cdrDimensionUnitIN)

s.Dimension.TextShape.SetPosition x + w / 2, y + h + 1

s.Dimension.TextShape.Text.Story.Size = 54
s.Dimension.TextShape.Fill.UniformColor.RGBAssign 0, 0, 0

Set Spt1 = CreateSnapPoint(x, y)
Set sPt2 = CreateSnapPoint(x, y + h)
Set s = ActiveLayer.CreateLinearDimension(cdrDimensionVertical, Spt1, sPt2, True, , , cdrDimensionStyleFractional, Units:=cdrDimensionUnitIN)

s.Dimension.TextShape.SetPosition x - 1, y + sx / 2

s.Dimension.TextShape.Text.Story.Size = 54
s.Dimension.TextShape.Fill.UniformColor.RGBAssign 0, 0, 0

ExitSub:
ActiveDocument.PreserveSelection = True
ActiveDocument.RestoreSettings
EventsEnabled = True
Optimization = False
ActiveDocument.ClearSelection
ActiveWindow.Refresh
Application.Refresh
ActiveDocument.EndCommandGroup
Exit Sub

ErrHandler:
MsgBox "Error occured: " & Err.Description
Resume ExitSub
End Sub
 

myront

CorelDRAW is best
Do you have or know of a macro that separates colors into halftones for easier screen printing?
I don't but there are plenty of real "coders" who do.
I'm not familiar with how it's done manually so I couldn't even begin to code it.
 
Top