Results 1 to 4 of 4

Thread: Ellipse

  1. #1
    Active Member
    Join Date
    2006-03
    Posts
    54
    Login to Give a bone
    0

    Default Ellipse

    I am trying to draw an ellipse in a UCS, but I got an error, modelization failure. Here is the code:

    Set SCUellipse = ThisDrawing.UserCoordinateSystems.Add(Centre, MilieuArc, Y, "New_SCU") 'Définit le SCU de l'ellipse : l'axe X est le petit axe de l'ellipse
    ThisDrawing.ActiveUCS = SCUellipse
    Theta = Atn((Endpoint(1) - Startpoint(1)) / (Sin(Endpoint(0) - Startpoint(0)))) GrandAxe = 1 / Cos(Theta)
    X(0) = Rayon
    X(1) = 0
    X(2) = 0
    Set Ellipse = ThisDrawing.ModelSpace.AddEllipse(Centre, MilieuArc, GrandAxe)

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,418
    Login to Give a bone
    0

    Default Re: Ellipse

    Are all your variables getting set? You must not be showing the complete sub. You set X(), but don't do anything with it.
    Last edited by Ed Jobe; 2007-06-20 at 02:09 PM.
    C:> ED WORKING....


    LinkedIn

  3. #3
    Active Member
    Join Date
    2006-03
    Posts
    54
    Login to Give a bone
    0

    Default Re: Ellipse

    Yes, I posted part of the code. I use X later in the code, not for the ellipse.

    I think I get what goes wrong. It seems you can only draw an ellipse in the WCS...

    Must use SendCommand "ellipse"...

  4. #4
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,418
    Login to Give a bone
    0

    Default Re: Ellipse

    No, I just tried the example in Help with a ucs active and no error. Even though the function draws the ellipse in the wcs, a ucs can be active. You can transform the usc coords to wcs before executing the function. I think you have the second and third arguments switched. They are Center, MajorAxis,RadiusRatio. RadiusRatio = MinorAxis/MajorAxis.
    C:> ED WORKING....


    LinkedIn

Similar Threads

  1. Ellipse 3d -> 2d
    By clovis in forum AutoLISP
    Replies: 12
    Last Post: 2011-03-18, 10:19 AM
  2. Ellipse - Offseted as Ellipse, not as a spline.
    By harilalmn in forum VBA/COM Interop
    Replies: 1
    Last Post: 2009-06-09, 03:34 PM
  3. Ellipse
    By cganiere in forum Revit Architecture - General
    Replies: 4
    Last Post: 2008-08-12, 12:12 AM
  4. A Ellipse
    By clintonc in forum VBA/COM Interop
    Replies: 3
    Last Post: 2007-09-12, 06:41 PM
  5. ellipse
    By glen.85659 in forum Revit Architecture - Wish List
    Replies: 3
    Last Post: 2005-06-25, 03:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •