Same_CurveLength.bas 559 B

123456789101112131415161718192021222324
  1. Sub CurveLength()
  2. Dim s As Shape
  3. Set s = ActiveSelection.Shapes(1)
  4. If s.Type = cdrCurveShape Then
  5. MsgBox s.Curve.Length
  6. End If
  7. ActivePage.Shapes.FindShapes(Query:="@type ='curve' and @com.curve.length=3").CreateSelection
  8. End Sub
  9. Sub Same_CurveLength()
  10. Dim s As Shape
  11. Dim cl As Double
  12. Dim cql As String
  13. Set s = ActiveSelection.Shapes(1)
  14. If s.Type = cdrCurveShape Then
  15. cl = s.Curve.Length
  16. cql = "@type ='curve' and (@com.curve.length - " & cl & ").abs() < 0.1"
  17. ActivePage.Shapes.FindShapes(Query:=cql).CreateSelection
  18. End If
  19. End Sub