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

How to get the application path of the progid

3 REPLIES 3
Reply
Message 1 of 4
rtejada
2878 Views, 3 Replies

How to get the application path of the progid

I will like to get the AutoCAD application path from the progid "AutoCAD.Application" without instanciating the application itself.
I am working on identifying the path for any AutoCAD application no matter the version it is installed.
I will appreciate any help
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: rtejada

In the registry, you read the value at:

HKEY_CLASSES_ROOT\AutoCAD.Application.XX\CLSID

Where XX can be 15, 16, 16.1 (2005) 16.2 (2006),
and presumably 17 (2007)

Take the default of that key and use it
another key:

HKEY_CLASSES_ROOT\CLSID\\LocalServer32

The value of that key needs to be parsed,
because it has the "/Automation" switch.

Another way, is to Look in:

AutoCAD.Drawing.XX\protocol\StdFileEditing\server

However, the latter will give you whatever the last
version that was run for the given release of DWG
(e.g., the "XX" in the key, 15 or 16, and in the near
future, 17).


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

wrote in message news:5113930@discussion.autodesk.com...
I will like to get the AutoCAD application path from the progid "AutoCAD.Application" without instanciating the application itself.
I am working on identifying the path for any AutoCAD application no matter the version it is installed.
I will appreciate any help
Message 3 of 4
rtejada
in reply to: rtejada

Thanks Tony, is there a registry entry to find the current autocad version, e.g. when I need to find out what the XX is, I noticed when you use CreateObject("Autocad.Application") it always gets the current or latest installed application. Also, will it works for its verticals too?

Thanks again
Message 4 of 4
cgay
in reply to: rtejada

rtejada,

To find the current AutoCAD version associated with "AutoCAD.Application", do the same thing Tony suggested, but instead of looking for (AutoCAD.Application.XX), look for (AutoCAD.Application). Then follow his instructions.

Basically what happens, is when you call CreateObject("AutoCAD.Applicaton") what ever the CLSID, default value, GUID that is defined there, will be instantiated.

If you want to see which versions are installed, look under
(HKLM\SOFTWARE\Autodesk\AutoCAD). You should notice that vertical products as well as AutoCAD will have subkeys under this, so you may need to filter the results based upon the "ProductName" in each subkey. Also note that just because a version is installed, it doesn't mean that the COM interface entries required to instantiate it are defined, you will still need to check using the method Tony describes above to verify that the computer knows which COM object to call.

C

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