473,405 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Autocad

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?

thanks
jm
Nov 21 '05 #1
1 2414
I have worked on similar projects like this in the past.

To find out if a process is running I normally use this method:
Dim localAll As Process() = Process.GetProcesses()
For i As Integer = 0 To localAll.GetUpperBound(0)
If localAll(i).ProcessName = "Your Process Name Here" Then
End If

If it is not running then you can launch your program with the
System.Diagnostics.Process.Start("c:\Autocad.exe") 'Or whatever

When you say manipulate the program it all depends on what you want to
do. If the AutoCAD method can be written in a shell format like
autocad.exe /? (Shows Help) then you could shell out to the exe.
otherwise you may have to use sendkeys procedures. Send keystrokes
programmatically that will automatically complete your task.

If you need to use a mouse to accomplish this task there are activex
components out there that will allow you to pass mouse-screen
coordinates to the screen to accomplish your tasks.
Hope that helps.

-Peter

Nov 21 '05 #2

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

Similar topics

0
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...
0
by: paii, Ron | last post by:
I have a table listing Part numbers and a full path to the Autocad drawing. I need a report that will print the drawing, Zoomed to a fixed sized window on the report. Has anyone done OLE with...
0
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...
3
by: perspolis | last post by:
I want to open Autocad files from my application and edit them there like Insert object in word
2
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...
4
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...
3
by: Aman | last post by:
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
1
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
3
by: shaiful | last post by:
Hi all, I have a problem with opening and closing AutoCAD in VB6 properly. I opened AutoCAD in VB by Dim AcadApp As Object, acadDoc As Object and close it by Set acadDoc = Nothing Set AcadApp...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.