Hello-
I have tried to grasp the VBA language but I am having a hard time...
THE PROBLEM:
The job-site uses Designer 9 to do all image editing. We use a specific call-out and detail arrowheads for all images. When opening these images in Designer x5 the arrowhead are all smaller then what they should be.
The final product is going to be CGM's and we use Designer x5 to convert all .DSF files to .CGMs. This has been a problem from the beginning. As of now we are rasterizing all objects except the numbers which are being hotspotted. This keeps all arrowheads the correct size thru the conversion process.
THE IDEA:
My idea was to select all the smaller arrowheads once in X5 and change the length x width of the head to the approximate correct size.
MY ATTEMPT = FAIL
When I record a marco to attempt this, it works to a point. It will do exactly what I want it to do on that figure, but when I run it on another figure it runs but does not do anything.
VBA:
Sub Macro1() ' Recorded 9/27/2013 ActiveDocument.CreateSelection ActivePage.Layers("Layer 1 ").Shapes(17), ActivePage.Layers("Layer 1 ").Shapes(16), ActivePage.Layers("Layer 1 ").Shapes(15), ActivePage.Layers("Layer 1 ").Shapes(14), ActivePage.Layers("Layer 1 ").Shapes(13), ActivePage.Layers("Layer 1 ").Shapes(12), ActivePage.Layers("Layer 1 ").Shapes(8), ActivePage.Layers("Layer 1 ").Shapes(3), ActivePage.Layers("Layer 1 ").Shapes(1) With ActiveSelection.Outline .SetProperties EndArrow:=ArrowHeads(126) .EndArrowOptions = ActiveDocument.CreateArrowHeadOptions(0.11111, 0.055555) End WithEnd Sub
When we convert DSF to CGM we use the preset marco within DesignerX5 (fileconverter) I would love to be able to incorporate this arrowhead macro in to that somehow...
Help ! Please!
before macro X5
after macro X5
It sounds like at some point in the conversion, or after Designer x5, you are resizing it.
Try this,
Report back to us.
The recorded macro selects a number of objects by their item number (i.e. Shape 17 on Layer 1). As it will vary by file which shapes (curves) you need to select for changing their arrowheads you need an approach for selecting them all - but only apply the changes to those arrowheads.
You could try this:
Sub Macro1()
Dim s As Shape
Dim CurveShapes As ShapeRange
Set CurveShapes = ActivePage.FindShapes(Type:=cdrCurveShape) 'selects all curve shapes on the current page
For Each s In CurveShapes
If s.Outline.EndArrow.Index > 0 Then 'arrow 0 is no arrowhead; this way at least no curves without arrowheads are touched
With s.Outline
.SetProperties EndArrow:=ArrowHeads(126)
.EndArrowOptions = ActiveDocument.CreateArrowHeadOptions(0.11111, 0.055555)
End With
End If
Next s
End Sub
Note that the Arrowhead (126) needs to be in the arrowhead preset list for the macro to work. The number looks quite high to me I have 90 or less arrowheads in my list in Corel DESIGNER X6 right now).
Best regards,Klaus.
Klaus-
O my! YES! It is working on every file that I use it on! This is EXACTLY what I was trying to do!
Except now our detail arrow needs some help
I know there is a way but what part of that script needs to be copied and modified to suit that particular arrow?