Since there's no .net group I hope this is the right place to ask...
I've been reading and trying the samples at acadx.com, Thanks, Frank...
I got the interopassemblydll dealybopper and then tried the autocadconnector
thingamajig.
Using the code as posted does start a console window, then acad, then shuts
down acad as apparently intended in the sample.
I tried to extend the sample by opening an existing dwg and cant' seem to
figure it out.
here's what I tried:
using System;
using AcadConnect;///(my name for AcadExample in the sample)
using AutoCAD;
namespace ConsoleApplication1
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
using (AutoCADConnector connector = new AutoCADConnector())
{
Console.WriteLine(connector.Application.ActiveDocument.Name);
///tried this first
///connector.Application.Open ("C:\\0\\0dwgs\\church\\church.dwg");
///but got error "no Open method in Application object, use .Documents.Open
instead"
///so i tried this:
///connector.Application.Documents.Add ("C:\\0\\0dwgs\\church\\church.dwg");
///and also tried this:
///connector.Application.Documents.Open
("C:\\0\\0dwgs\\church\\church.dwg");
///and got error "no Documents property in Application"...or something like
that
///intellisense sees a Documents property but it won't run
///and since the connector.Application has an .Application object I tried
that too
///connector.Application.Application.Documents.Open
("C:\\0\\0dwgs\\church\\church.dwg");
/// but still get the 'No documents' error...
}
Console.ReadLine();
}
}
}
Also I'm a bit confused about what I should be trying to learn here. If
Autocad doesn't support .Net should I be going with c++ and ObjectArx? But
I've seen mention of using .Net with com wrappers (which I only fuzzily
understand the idea of). I've seen several people saying they love .Net but
how to go about getting hold of an instance of Acad, opening or creating a
specific drawing, and adding or manipulating native acad objects???