in

connecting users of the CorelDRAW family of products

Curve is not drawn (Vba & CorelScript)

Last post 07-24-2008 7:32 by Hendrik Wagenaar. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-23-2008 3:22

    • Soumi
    • Not Ranked
    • Joined on 07-23-2008

    Curve is not drawn (Vba & CorelScript)

     Hi!

    I'm trying to draw a curve with Vba and Corelscript, but it doesn't work. In the second row of the sourcecode, it gives me an errormessage, that the curveinformation is invalid.  The parameters should me in thousandth millimeters:

    CorelDRAW.Application.CorelScript.BeginDrawCurve -600000, -520000
    CorelDRAW.CorelScript.DrawCurveLineTo -600000,-620000
    CorelDRAW.Application.CorelScript.EndDrawCurve
    CorelDRAW.Application.CorelScript.ApplyOutline 250, 1, 0, 0, 100, 0, 0, 0, 0, False, 2, 0, False
    CorelDRAW.Application.CorelScript.StoreColor 2, 0, 0, 0, 100
    CorelDRAW.Application.CorelScript.SetOutlineColor

    thanks for help

     

    Soumi

  • 07-24-2008 7:32 In reply to

    Re: Curve is not drawn (Vba & CorelScript)

    I'm not sure.  Why are you using corelscript? 

    Here's a vba pure version (I think it's doing the same thing)

        Dim s1 As Shape
        ActiveDocument.SaveSettings
        ActiveDocument.Unit = cdrTenthMicron
       
        Set s1 = ActiveLayer.CreateLineSegment(-600000, -520000, -600000, -620000)
        s1.Outline.SetProperties 250
        s1.Outline.SetProperties Color:=CreateCMYKColor(0, 0, 0, 100)

        ActiveDocument.RestoreSettings

Page 1 of 1 (2 items)
© 2008 Corel Corporation. CorelDRAW and the CorelDRAW Balloon are trademarks or registered trademarks of Corel Corporation. The content herein is in the form of a personal web log ("Blog") or forum posting. As such, the views expressed in this site are those of the participants and do not necessarily reflect the views of Corel Corporation, or its affiliates and their respective officers, directors, employees and agents. Terms and Conditions.