Looking for a macro that will show the curves length. Including multiples, combined/grouped.
Normally you would go to Properties docker and click the 5th button, Curve and that woulddisplay the curves length. Too many extra steps.
I managed to get the Edit Scale & Nudge dropdown in my right-click routine foron the fly action and works like a charm
Thinking of doing the same where I right-click and within the list it will display it. See above.
Any takers?Thx
You could try this.
The curve length is displayed as a text on the page, just above the curve you select.
Sub Curve_Length()Dim sh As Shape, s As ShapeDim mX#, mY#, crvLen#If ActiveShape Is Nothing Then Exit SubSet s = ActiveShapeIf s.Type <> cdrCurveShape Then s.ConvertToCurvescrvLen = s.Curve.LengthcrvLen = Round(ActiveDocument.FromUnits(crvLen, ActiveDocument.Rulers.HUnits), 2)'Display Curve length on the pagemX = s.PositionXmY = s.PositionYSet sh = ActiveLayer.CreateArtisticText(mX + 0.25, mY + 0.25, crvLen, Size:=12) ' Size is FontsizeEnd Sub
I use several codes to add various information to the blue "window bar" (whatever it's called). I was just playing around with the idea and just left it. Doing this could mean using less dockers. Perhaps the curve length could also be added? Would have to use a code to exit if the selection isn't a curve and also if nothing selected.
Private Sub GlobalMacroStorage_SelectionChange()Dim l As Layer
If Documents.Count > 0 Then'If ActiveSelection.Shapes.Count > 0 Then'If ActiveShape.Type = cdrTextShape Then Exit SubSet l = ActiveLayer
AppWindow.Caption = "CorelDRAW X7 (64-Bit) " & Application.Version & _ " " & ActiveDocument.FilePath & ActiveDocument.FileName & _ " Active Layer = " & ActiveLayer.Name & _ " Scale=1:" & ActiveDocument.WorldScale & _ " " _ & VBA.Date & _ " " & "Doc Res = " & ActiveDocument.Resolution '" " & "Area of Shape = " & Round(ActiveShape.DisplayCurve.Area, 3) & " Sq In" 'End IfEnd If
End Sub
Myron That code is kinda genius!! LOL wowIs there any way that the width and height of the selected object could be displayed there?
inkmachine said:Is there any way that the width and height of the selected object could be displayed there?
An alternative, if you don't mind having a small user form visible, would be to use my Size Shower macro.
The main reason that macro exists is to provide the ability to see the size in units that are independent of what is being used in the document.