.NET

Reply
Valued Contributor
rtejada
Posts: 61
Registered: ‎06-19-2002
Message 1 of 4 (395 Views)

How to get the application path of the progid

395 Views, 3 Replies
03-17-2006 05:30 AM
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
*Tony Tanzillo
Message 2 of 4 (395 Views)

Re: How to get the application path of the progid

03-17-2006 08:25 PM 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
Valued Contributor
rtejada
Posts: 61
Registered: ‎06-19-2002
Message 3 of 4 (395 Views)

Re: How to get the application path of the progid

03-20-2006 05:08 AM 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
Distinguished Contributor
cgay
Posts: 125
Registered: ‎08-02-2005
Message 4 of 4 (395 Views)

Re: How to get the application path of the progid

03-20-2006 07:39 AM 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
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.