See the top rated post in this thread. Click here

Results 1 to 9 of 9

Thread: Generate curve table

  1. #1
    Member Dipen_n's Avatar
    Join Date
    2003-11
    Posts
    6
    Login to Give a bone
    0

    Post Generate curve table

    All the details are avialable in the attached file,
    it would be very nice of you
    if you can help me generate this curve table by selecting two end points of the curve

    regards
    dipen
    Attached Files Attached Files

  2. #2
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    1

    Default Re: Generate curve table

    Would you be willing to learn how to do it?

  3. #3
    Member Dipen_n's Avatar
    Join Date
    2003-11
    Posts
    6
    Login to Give a bone
    0

    Default Re: Generate curve table

    YES BUT HOW??

  4. #4
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: Generate curve table

    Good!

    Ok, the first step is to create the command function and get the arc. You will need to use the Visual LISP functions defun, setq, and either entsel or ssget and ssname. The help files ought to help you understand how to use those functions.

  5. #5
    Member Dipen_n's Avatar
    Join Date
    2003-11
    Posts
    6
    Login to Give a bone
    0

    Default Re: Generate curve table

    Thanks for your support, but i dont know anything else
    than loading a lisp file

  6. #6
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: Generate curve table

    Open the help files (F1, Developer's Guide, AutoLISP Reference) and read up on the functions I listed.

    defun is how you will create a command-line function (think "command"). The function's name needs to start with C: to be recognized as a commnad-line function. Don't worry about declaring arguments/variables at this moment. The help files show how to use this function.

    setq is used to store data in a variable (called a "symbol" in the help files). You will need to use variables to store data such as the arc the user selects.

    enstsel is one function that allows the programmer to let the user select an object in AutoCAD. Or you could use ssget to make a selection set of what the user selects (the advantage being that you can "filter" what the user selects, to force them to pick only arcs).

    So you need to use defun to "name" and start your program and setq to store what the user selects via the enstsel function.
    Code:
    (function? C:CurveTable ()
     (function? inpPick (function?))
     (princ)) ; clean exit (most programs end with this)

  7. #7
    Woo! Hoo! my 1st post
    Join Date
    2015-09
    Posts
    1
    Login to Give a bone
    0

    Default Re: Generate curve table

    I would, with some help.
    I'm trying to develop a custom curve table, but don't know how to write code.
    Would you be able to help me ?

  8. #8
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    509
    Login to Give a bone
    0

    Default Re: Generate curve table

    Best thing is to understand what you can get from an object and arc has a few simple ones and using vl lisp is intuitive. Here is a program that you can use to see whats available

    Code:
    ;;; Dump all methods and properties for selected objects              ;
    ;;;===================================================================; 
    ;;; DumpIt                                                            ; 
    ;;;-------------------------------------------------------------------; 
    ;;;===================================================================; 
    (defun C:DumpIt ( / ent) 
      (while (setq ent (entsel)) 
        (vlax-Dump-Object 
          (vlax-Ename->Vla-Object (car ent)) T
        ) 
      ) 
      (princ) 
    )
    ok know for step 1 pick an arc whats its radius thats your turn also startpoint endpoint
    Code:
    (defun c:test ()
    (setq obj (vlax-Ename->Vla-Object (car (entsel))))
    (alert (vla-get-objectname obj))
    )

  9. #9
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,586
    Login to Give a bone
    0

    Default Re: Generate curve table

    I wrote one many years ago when all we had was Vanilla AutoCAD. For selected arc segments it created a curve table, but labeled line segments. It requires a block for the table and another for the line label. You may need to add (vl-load-com) to the top of the file, I have that preloaded in acaddoc.lsp instead of adding it to every routine.

    It uses textsize to scale the arc & line blocks, but I would use (/ 0.1 (getvar 'cannoscalevalue)) in place of (getvar "TEXTSIZE") today. It works with polyline segments as well. You will need to enter the chainage for the PC, but everything else should be calculated from the arc segment. You would have to modify it for your needs.
    Attached Files Attached Files

Similar Threads

  1. CV204-1L: Using Automation to Generate a Pond Stage-Storage Table
    By Autodesk University in forum Civil Infrastructure
    Replies: 0
    Last Post: 2013-05-05, 03:24 AM
  2. drawing curves from a curve table
    By brian.59027 in forum AutoCAD General
    Replies: 3
    Last Post: 2007-08-01, 12:45 PM
  3. Generate a table of information from drawing Objects
    By cbernier01 in forum AutoCAD General
    Replies: 8
    Last Post: 2006-06-02, 11:38 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
  •