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

Automation of 2006

0 REPLIES 0
Reply
Message 1 of 1
douglas_cumali
117 Views, 0 Replies

Automation of 2006

Can you control 2006 from an external program using .NET?
ie in the same way you can use COM in an ARX app to open up excel application modify a spreadsheet and close excel.
I can't find any examples using COM or .NET to do this.
What I'm looking for is a code fragment similar to this code to open excel for opening autocad
AfxOleInit()
AfxEnableControlContainer();
CWorksheets oSheets;
CWorksheet oSheet;
CRange oRange;
// Start Excel and get Application object.
if(!oExcel.CreateDispatch("Excel.Application"))
{
AfxMessageBox("Cannot start Excel and get Application object.");
acedRetVoid () ;
return (RSRSLT);
}
else
{
//Make the application visible and give the user control of
//Microsoft Excel.
oExcel.put_Visible(TRUE);
oExcel.put_UserControl(TRUE);
// Add a new workbook and get the first worksheet in that book.
oBooks = oExcel.get_Workbooks();
oBook = oBooks.Open(........
Anybody done this for 2006 to start Acad and open a drawing using .NET or COM from another app?
0 REPLIES 0

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