VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

C# connection to Autocad LT 2014

1 REPLY 1
Reply
Message 1 of 2
Anonymous
1201 Views, 1 Reply

C# connection to Autocad LT 2014

Hi all!

 

I have a c# connection, this code run fine in Autocad 2014. The final purpose of my program is create a .dwg file and add labels in mentioned .dwg file but not work in Autocad LT 2014 .

 

My code:

 

try
{

// Upon creation, attempt to retrieve running instance
m_AcadApp = (AcadApplication)Marshal.GetActiveObject("AutoCAD.Application.19");
m_bAcadInit = true;
}
catch
{
try
{
// Create an instance
m_AcadApp = new AcadApplication();
m_bAcadInit = true;
} catch(Exception ex)
{
MessageBox.Show("An error occurred trying to open the AutoCAD.", "Attention", MessageBoxButtons.OK, MessageBoxIcon.Information);

//In LT version this message appears

}

 

Is possible open Autocad LT 2014 with my code or similar code?

 

Thank you very much.

Tags (1)
1 REPLY 1
Message 2 of 2
Alfred.NESWADBA
in reply to: Anonymous

Hi,

 

you might get start AutoCAD LT using e.g. Process.Start, but at least AutoCAD LT has no built in API, so there is also no COM-interface that can be used like you did with AutoCAD.

That is one of the major reasons why LT is much cheaper than the full version.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)

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

Post to forums  

Autodesk Design & Make Report

”Boost