473,654 Members | 3,104 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Apr 3 '07 #1
3 2766
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

Apr 3 '07 #2
"Aman" <me*********@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.
http://www.personal.leeds.ac.uk/~bgy1mm

Apr 3 '07 #3
On 3 Apr 2007 06:47:33 -0700, "Aman" <me*********@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++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
Apr 4 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1915
by: Bruce | last post by:
Hi: I was interested in installing AutoCAD 2005 on my computer with Win XP Pro. I went to the AutoCAD website, and it said something like "Windows XP Pro, and Service pak 2 are compatible with AutoCAD 2005". So I thought that meant that Service pak 2 installed a .NET Framework for AutoCAD to work. I installed SP2, and AutoCAD still won't install correctly. My question is this: Are they 2 different animals?
0
1375
by: Kathy | last post by:
Hi and Thanks for you help! Several years ago I created a Product Specification db that displayed AutoCad 2000 drawings in a report (The Spec Sheet) Recently we upgraded our AutoCad to the 2004 version. Now, we can insert a drawing into a table and if we double click the drawing (an ole object)AutoCad will open and you can edit the drawing with no problem. However if you run a query including the drawing field and doubleclick the colum in...
0
1032
by: mhadi | last post by:
Hello I want to develope a solution for an electrical consultation company which requires to give an input of multilayered AutoCAD r14 file (.dwg). The electrical drawing is placed at one or more layer. there are some curves representing the conductors(power lines or data cables) and condude (concealed and of different diameters). A specification is written with a curved line (representing conductor and condued) to define the no. of...
2
2349
by: john m | last post by:
Hello, I downloaded the beta vb8 express thing and since installing it none of my AUTOCAD vba routines work anymore. I tried the AcadVBA newsgroup but no one else seems to have had this. My operating system is called Windows 2000 "Professional" Should i Re-install ACAD? Uninstall Dot Net?
1
2430
by: john m | last post by:
i want to write a vb dotnet program to see if autocad is running and if not start it then just start to manipulate the application what is the correct method to do this? can anyone point me to some sample code?
4
5644
by: ARF | last post by:
I'm testing AutoCAD 2005 automation via VS2005 Pro C++/CLR and I'm getting fatal compiler errors. I start with a default C++/CLR class library project and modify it by adding the following references: acdbmgd.dll acmgd.dll the entire source for the default library header file is:
29
16530
by: 63q2o4i02 | last post by:
Hi, I'm interested in using python to start writing a CAD program for electrical design. I just got done reading Steven Rubin's book, I've used "real" EDA tools, and I have an MSEE, so I know what I *want* at the end of this; I just have never taken on a programming task of this magnitude. I've seen that some are using python as a utility language for existing CAD environments, and I've also found some guy who's writing a 2d drafting...
3
3809
by: koliver | last post by:
Can anyone provide me with information on linking an Access database with GPS mapping software
1
2532
by: Zaher Rabah | last post by:
Hi I work on a program for Real Estate. All the maps pictures are found at AutoCad Software. I want to open AutoCad from Access . Or if we can open specific file name in AutoCad. Regards
0
8379
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8816
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7309
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2719
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1597
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.