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

Error in InsertBlock

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
239 Views, 0 Replies

Error in InsertBlock

Hi All,

Here's my code,

Autodesk.AutoCAD.Interop.AcadApplicationClass app = new Autodesk.AutoCAD.Interop.AcadApplicationClass();

Autodesk.AutoCAD.Interop.AcadDocument doc = app.ActiveDocument;

Autodesk.AutoCAD.Interop.Common.AcadBlock block = doc.Blocks.Add(new double[] {0,0,0},"Sam");

block.AddLine(new double[] {1,1,0},new double[] {10,10,0});

doc.SaveAs("c:\\Sam.dwg",Autodesk.AutoCAD.Interop.Common.AcSaveAsType.acR15_dwg,new Autodesk.AutoCAD.DatabaseServices.SecurityParameters());

double[] InsertPoint = new double[2];
InsertPoint[0] = 5;
InsertPoint[1] = 5;
InsertPoint[2] = 0;

block.InsertBlock(InsertPoint,"c:\\Sam.dwg",1,1,1,0,"");

I'm getting error in the final line - 'block.InsertBlock(InsertPoint,"c:\\Sam.dwg",1,1,1,0,"");' - can anyone rectify my problem, thank's in advance

Prakash.C
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