f



using autocad using C

hi,
im trying to draw some rectangles,lines 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

0
4/3/2007 1:47:33 PM
comp.lang.c 30657 articles. 5 followers. spinoza1111 (3246) is leader. Post Follow

3 Replies
778 Views

Similar Articles

[PageSpeed] 33

On Apr 3, 9:47 am, "Aman" <mehraama...@gmail.com> wrote:
> hi,
> im trying to draw some rectangles,lines 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



0
lpitcher (688)
4/3/2007 2:08:53 PM
"Aman" <mehraamanin@gmail.com> wrote in message news:
> hi,
> im trying to draw some rectangles,lines 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.
http://www.personal.leeds.ac.uk/~bgy1mm



0
regniztar (3128)
4/3/2007 11:29:32 PM
On 3 Apr 2007 06:47:33 -0700, "Aman" <mehraamanin@gmail.com> wrote in
comp.lang.c:

> hi,
> im trying to draw some rectangles,lines 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.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
0
jackklein (3930)
4/4/2007 1:47:59 AM
Reply: