|
|
|
|
|
|
CorelDraw
|
Change All Arrows to one Standard Arrow
|
|
Ease of Use
|
Easy
|
Version tested with
|
2005 (X3)
|
Submitted by:
|
malik641
|
Description:
|
This will take all the arrows in the ActiveDocument on the ActivePage and make them into a single standard arrow.
|
Discussion:
|
Say you have engineering drawings in CorelDraw and it contains arrows. Now it has been revised a few times since its creation. If the user who makes the revisions adds some arrows, chances are they are different. There are many arrows in CorelDraw, and some of them differ subtly. This macro insures that all arrows used will be exactly the same. This is great if you want consistency in your arrow types.
|
Code:
|
instructions for use
|
Option Explicit
Public Sub Arrow_Convert()
If Documents.Count < 1 Then Exit Sub
Application.Optimization = True
Dim shp As CorelDRAW.Shape
Const ArrowType As Integer = 3
ActivePage.Shapes.All.CreateSelection
For Each shp In ActiveDocument.Selection.Shapes
If shp.Outline.Type = cdrOutline Then
If shp.Outline.StartArrow.Index <> 0 Then
shp.Outline.StartArrow = ArrowHeads.Item(ArrowType)
End If
If shp.Outline.EndArrow.Index <> 0 Then
shp.Outline.EndArrow = ArrowHeads.Item(ArrowType)
End If
End If
Next shp
ActiveDocument.ClearSelection
Application.Optimization = False
ActiveWindow.Refresh
End Sub
|
How to use:
|
- When in CorelDraw, Press Alt+F11. This will take you into the VBE
- In the VBE, select your GMS (global macro storage) project OR the CorelDraw document in the Project Window, click Insert --> Module
- Copy the above code and paste into the new Module
- Close the VBE
- In CorelDraw, press Tools --> Visual Basic... --> Play... --> Arrow_Convert
|
Test the code:
|
- In CorelDraw, press Tools --> Visual Basic... --> Play... --> Arrow_Convert
|
Sample File:
|
Arrow_Convert Example.zip 9.5KB
|
Approved by mdmackillop
|
This entry has been viewed 46 times.
|
|