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
MacroMonster has a free Macro that will show curve length. Jeff’s Curvelength – macromonster.com The installer only detects up to CorelDRAW 2018. So you my need to reach out to them to get the GMS file. It works fine in 2023.
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
That's some pretty innovative use of screen space Myron!
@Suku, thanks but not up for having a text drop in. Cool tho.
@ Myron... that is kinda cool. I did manage to get the length displayed (like 20 digits after the decimal) up therebut I have no clue what im doing and vba keeps throwing errors. Didnt you do something like this a long time ago on oberonforums?Glancing up/down/wherever and seeing the length is fine, would not like to go look for it.@Shelby, nope, not looking for a macro.
Cant figure out why CD has to hide things.