Results 1 to 4 of 4

Thread: How to draw an Arc with 3 points using vba

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2011-03
    Posts
    1
    Login to Give a bone
    0

    Default How to draw an Arc with 3 points using vba

    Dear All,

    i am working on autocad i am using backed as VBA. Can any one help me is there any method for Draw Arc like First Point, Second Point and Third Point as input

    Thanks in Advance

  2. #2
    All AUGI, all the time zoomharis's Avatar
    Join Date
    2005-02
    Location
    Abu Dhabi (Native-India)
    Posts
    506
    Login to Give a bone
    0

    Default Re: How to draw an Arc with 3 points using vba

    The method available for drawing arc is

    Code:
     
    RetVal = object.AddArc(Center, Radius, StartAngle, EndAngle)
    But using the three points of an arc, you can find all these function parameters.

    This link describes how to find the centre point and radius of a circle (the same logic applies for arc as well) using three points. Once you have these values, then you can use the above method to draw the required arc.

  3. #3
    Woo! Hoo! my 1st post
    Join Date
    2013-04
    Posts
    1
    Login to Give a bone
    0

    Default Re: How to draw an Arc with 3 points using vba

    Hi there

    I need some help with VBA in autocad
    I need to know is there any other ways to draw arc in autocad except center, radius, start angle, end angle method
    other ways to find distance between two points using vba except that old method of squareroot co-ordinates
    I need an object which give me distance

    thanx in advance

    Regards
    Sunny Dedhia

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

    Default Re: How to draw an Arc with 3 points using vba

    Hi Sunny,
    You just need to prompt the user for the values you want, then you can calculate/convert to the parameters that the function requires. You would use functions from the Utility library, such as GetPoint(), GetReal(), GetAngle(), GetDistance(). You could use GetPoint() to have the user select a center point, start point and end point, or 3 points along the curve. You could use GetReal() to have the user type in a number for the distance or GetDistance() to have then pick two points for the distance. You can also make some assumptions, such as starting from the last point used or StartAngle = 0. So even though the AddArc() function has fixed parameters, you still have a lot of flexibility as to how to get the information you need.

    You can also search this forum for AddArc to see if there is some sample code already written. You can also show us what you have so far to provide us with more details as to what you want to do.
    C:> ED WORKING....


    LinkedIn

Similar Threads

  1. Draw Polyline from list of points
    By LSElite in forum AutoLISP
    Replies: 1
    Last Post: 2015-04-21, 03:53 AM
  2. Draw 3d-polylines to points
    By cadplayer in forum AutoLISP
    Replies: 0
    Last Post: 2012-02-07, 02:50 PM
  3. trying to draw lines from a points list help
    By d_m_hopper in forum AutoLISP
    Replies: 7
    Last Post: 2008-04-08, 11:59 AM
  4. How to draw a 3d polyline from a list of points?
    By GreyHippo in forum AutoLISP
    Replies: 2
    Last Post: 2006-12-15, 06:35 PM
  5. Draw an Arc, tangent to two points...
    By Shizzjr in forum AutoCAD General
    Replies: 4
    Last Post: 2006-02-23, 11:56 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
  •