.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Howto convert Process in AcadApplication

1 REPLY 1
Reply
Message 1 of 2
doc1209
373 Views, 1 Reply

Howto convert Process in AcadApplication

Hi,

i have already seen some threads about howto connect to one specific
acad process by GetActiveObject()-function.

So i want to connect in a different way. I have a "Process" that i got from GetProcessById().

This Process cannot be casted directly to AcadApplication (It results in an InvalidCastException...).

How can i get an AcadApplication by knowing the processid and having the corresponding Process?
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: doc1209

I don't think there's any way to get a COM object from a process id.

The best you can do is to use the ROT (RunningObjectTable) to connect to a specific instance. Search the net for IRunningObjectTable & C# and you should find something helpful.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm

wrote in message news:6047048@discussion.autodesk.com...
Hi, i have already seen some threads about howto connect to one specific acad process by GetActiveObject()-function. So i want to connect in a different way. I have a "Process" that i got from GetProcessById(). This Process cannot be casted directly to AcadApplication (It results in an InvalidCastException...). How can i get an AcadApplication by knowing the processid and having the corresponding Process?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost