using autocad using C

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Aman

    using autocad using C

    hi,
    im trying to draw some rectangles,line s in autocad using c, is their
    any function that can be used, plz help, also is it possible to read
    values from a ms excel file in c

  • Lew Pitcher

    #2
    Re: using autocad using C

    On Apr 3, 9:47 am, "Aman" <mehraama...@gm ail.comwrote:
    hi,
    im trying to draw some rectangles,line s in autocad using c, is their
    any function that can be used, plz help,
    The details and techniques of creating or manipulating an interface
    between arbitrary C code and Autocad is out of the scope of this
    newsgroup. You would best ask this question in a newsgroup that
    relates to Autocad development, and not here.
    also is it possible to read values from a ms excel file in c
    Yes, it is possible. However, there are no standard APIs to perform
    that task exclusively, and thus a solution, while achievable, is a
    "simple matter of programming". You will have to determine the format
    of the excel file contents, and use fopen() and fread() (or the other
    f*() file I/O routines) to access the data.

    HTH
    --
    Lew



    Comment

    • Malcolm McLean

      #3
      Re: using autocad using C

      "Aman" <mehraamanin@gm ail.comwrote in message news:
      hi,
      im trying to draw some rectangles,line s in autocad using c, is their
      any function that can be used, plz help, also is it possible to read
      values from a ms excel file in c
      >
      Go to the product vendors to find out how to integrate C with their product.
      It is quite possible that autocad allow you to write plug-ins in C, but I
      have no idea how to compile them or what interfaces to use to get access to
      the autocad graphics system. AS anothe rposter notes, if you know the format
      of an MS Excel file then in principle you cna parse it with low-level
      routines. In practise this is likely to be far more trouble than it is
      worth, and you are better off getting a library from Microsoft. However you
      can do a lot with CSV files, which Excel will save. If you root around in
      the "Fuzzy Logic Trees" section of my site you should find a parser for CSV
      files.

      --
      Free games and programming goodies.




      Comment

      • Jack Klein

        #4
        Re: using autocad using C

        On 3 Apr 2007 06:47:33 -0700, "Aman" <mehraamanin@gm ail.comwrote in
        comp.lang.c:
        hi,
        im trying to draw some rectangles,line s in autocad using c, is their
        any function that can be used, plz help, also is it possible to read
        values from a ms excel file in c
        Several people have responded that your question is beyond the scope
        of this group, and indeed it is, but you can actually do both of these
        things in standard C programs since both of these programs have text
        file interfaces.

        In the case of Excel, export your spreadsheet in one of the text
        formats, such as comma delimited or tab delimited, and write your C
        program to read the file and process the data as you want.

        AutoCAD provides the feature of executing scripts from ordinary text
        files, if you know what to put in them.

        There is an example a program that generates script files for AutoCAD
        on my web page http://jk-technology.com/C_Unleashed/code_list.html. If
        you study it, you may figure out how to modify it to generate scripts
        to do what you want.

        --
        Jack Klein
        Home: http://JK-Technology.Com
        FAQs for
        comp.lang.c http://c-faq.com/
        comp.lang.c++ http://www.parashift.com/c++-faq-lite/
        alt.comp.lang.l earn.c-c++

        Comment

        Working...