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!
Updated Designer 9 image with detail arrows...
Prob not much help but I ran a basic macro for the detail arrows...
.SetProperties StartArrow:=ArrowHeads(147) .StartArrowOptions = ActiveDocument.CreateArrowHeadOptions(0.222012, 0.110732)
If the common pattern is that the lines for the detail arrows are done with start point of the line as arrowhead and callouts with end point as arrowhead then you can simply add a condition to the macro to exclude those curves that have an arrowhead assigned to the start point of the curve (search for those with arrowhead on end point only):
Sub Macro1()
Dim s As Shape
Dim CurveShapes As ShapeRange
Set CurveShapes = ActivePage.FindShapes(Type:=cdrCurveShape)
For Each s In CurveShapes
If s.Outline.EndArrow.Index > 0 And s.Outline.StartArrow.Index = 0 Then 'arrow 0 means no arrowhead
With s.Outline
.SetProperties EndArrow:=ArrowHeads(126)
.EndArrowOptions = ActiveDocument.CreateArrowHeadOptions(0.11111, 0.055555)
End With
End If
Next s
End Sub
Best regards,Klaus.
Klaus-Hmm, I think I didn't explain the detail arrowhead part to well...The first macro did a excellent job with the callout arrowheads. That same process (making arrowheads bigger) needs to be applied to the detail arrowheads as well. I went through the enlarging process and it came to this
.SetProperties StartArrow:=ArrowHeads(147) .StartArrowOptions = ActiveDocument.CreateArrowHeadOptions(0.222012, 0.110732)"
Our spec does not specify which end the arrow has to be on. As long as the following requirements are meet in Designer 9 its ok to use.Callout: .5 pt line weight, width: 150; height 75Detail : 1 pt line weight, width 300; height 150Now, if the callout macro will be dependent on which end the arrowhead is on that's fine. That's easy enough to do in Des9.
I really appreciate you taking the time to help me. THANKS!