Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

About automating.

Status
Not open for further replies.

WilliamGS

Programmer
Jan 21, 2004
54
PE
Hi all,
I have a program that automates AutoCAD 2000, it worked fine, but then I have installed a previous version (14), it causes and error in the following code:

CLSID clsid;
if :):CLSIDFromProgID(OLESTR("AutoCAD.Application"), &clsid) != NOERROR) //Here is the error!!!
{
::AfxMessageBox(IDS_ERROR_ACAD);
return FALSE;
}

How can I specify one versión or another to 'CLSIDFromProgID()'. I'm using VC++ 6.00

Thanks in advance,
William G.S.
 
CLSIDFromProgID gives the Class ID stored in Registry for the Program from which the application is automated... For the new version of AutoCAD, the Program ID may be different and that why you are not getting that done.

AutoCAD.Application may be replaced with the exact registry entry of AutoCAD...

Cheers,

Ravi
 
look in OleView for correct ProgID.

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top