AutoCAD 2014, C# call AddHatch throw exception

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I use Auto CAD 2014, by in the follow code throw exception error, I donot why, pls help me
private void button4_Click(object sender, EventArgs e)
{
AcadApplication app = new AcadApplicationClass();
app.Documents.Open(this.textBox1.Text, missing, missing);
app.Visible = false;
IAcadHatch hatch = app.ActiveDocument.ModelSpace.AddHatch(1, "ANSI31", true);
// inner loop
object[] inloop = new object[1];
AcadCircle circle = app.ActiveDocument.ModelSpace.AddCircle(new double[] { 100, 100, 0 }, 200);
inloop[0] = circle;
hatch.AppendInnerLoop(inloop); // <====== in here: Invalid object array
string file = string.Format(@"{0}Demo_{1}.dwg", AppDomain.CurrentDomain.BaseDirectory, System.Guid.NewGuid());
app.ActiveDocument.SaveAs(file, AcSaveAsType.ac2010_dwg, missing);
app.Quit();
}