View Single Post
  #2  
Old 29-01-2015, 12:01
PAnderson PAnderson is offline
Member
 
Join Date: Nov 2003
Posts: 47
Default

After some searching I actually found a macro posted by "Mo" for free on the CorelDRAW Community forums. He wrote it for X4 in 2008, but it still works in X7!

However, it does run a bit slow, but I don't know if that's due to the large number of AM strokes, or the age of the macro. Maybe someone (Shelby?) could take a look and see if there is anything that can be added to update it.

HTML Code:
Sub ArtistBrushBreak()
    '
    ' Scripted by mo 19.07.2008 (Version for Draw12 and X3)
    ' Updated by mo 24.07.2008 (Version includes X4)
    '
    ' Description: Breaks ArtisticMedia strokes apart
    '
    ' It is strictly recommended that the Arstistic Media Brushes should be drawn on a separate Layer!
    ' Please ungroup all Shapes on that Layer, otherwise they will be DELETED!
    
ActiveDocument.BeginCommandGroup "Brush Break"
On Error GoTo ErrHandler
    Dim sr As Shape, origSel As New ShapeRange, s As Shape
    On Error Resume Next
        For Each sr In ActiveLayer.Shapes
        If sr.Type = cdrArtisticMediaGroupShape Then
 
            origSel.Add sr
            origSel.CreateSelection
            ActiveSelection.Separate
             
        Else
    End If
 Next
    ActiveLayer.FindShapes(Type:=cdrCurveShape).CreateSelection
        For Each s In ActiveSelection.Shapes
        ' Deletes ALL open Curves on the Active Layer!
        If s.Curve.Closed = False Then
        s.Delete
        Else
        End If
Next
ExitSub:
 ActiveDocument.EndCommandGroup
 ActiveDocument.ClearSelection
 Exit Sub
 Optimization = True
    ActiveWindow.Refresh
    Application.Refresh
    
ErrHandler:
 MsgBox "Error occured: " & Err.Description
 Resume ExitSub
End Sub
Reply With Quote