OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > Feature requests/wishlist

Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 19-03-2010, 17:41
gorgo2 gorgo2 is offline
Senior Member
Join Date: Feb 2010
Posts: 107
Default Jeff's Delete Small Objects macro

Hi there. Could you please add a feature in this macro where it will only search and delete small objects within the selected area?



Option Explicit

Public Sub RemoveSmallSubpaths(s As Shape, tol As Double)
    Dim i As Integer

    If s.Type = cdrCurveShape Then
        For i = s.Curve.SubPaths.Count To 1 Step -1
            If s.Curve.SubPaths(i).Length < tol Then
            End If
        Next i
    End If

End Sub

Public Sub RemoveSmallCurves(tol As Double)
    ActiveDocument.BeginCommandGroup "Remove small curves"

    Dim sr As ShapeRange
    Dim s As Shape

    Set sr = ActiveDocument.ActiveLayer.FindShapes

    Optimization = True
    For Each s In sr
        RemoveSmallSubpaths s, tol
    Next s
    Optimization = False


End Sub

Public Sub RemoveSmallCurves1()
    RemoveSmallCurves 0.1
End Sub
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Global Macro delete Michael Cervantes CorelDRAW/Corel DESIGNER VBA 17 16-11-2010 08:11
Find and delete objects with no fill or outline keytecstaff CorelDRAW/Corel DESIGNER VBA 17 22-06-2010 23:34
Delete Segment macro addendum request Rakker New product ideas 1 18-10-2008 15:47
Delete matching objects click101 CorelDRAW/Corel DESIGNER VBA 2 02-06-2008 16:14
Delete small objects macro Jeff Harrison New product ideas 3 19-05-2007 12:19

All times are GMT -5. The time now is 07:40.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com