Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

sundaram1087
858 Vistas, 2 Respuestas

Insert Block In Autocad Using C#

Hi

 

 I tried to insert the block in autocad by Using C# in COM Object method. in that am getting error that "Key not found"

 

This is my function

 

public AcadBlockReference NewblockInsert(Double[] Inspt, string BlockName )
{
double Dimsacle = 1;
AcadBlockReference BlkInsert=null;
try
{
BlkInsert = (AcadBlockReference)CadDoc.ModelSpace.InsertBlock(Inspt, BlockName, 0, 0, 0, 1);


}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
return BlkInsert;
}

 

Could you please provide the solution for that

 

Regards

Shunmugasundaram

 

ilia.borisov
en respuesta a: sundaram1087

Are you trying to insert already existing block or you first create block and then try to insert it with that method?
sundaram1087
en respuesta a: ilia.borisov

Hi

 

Existing block only

 

Regards 

Shunmugasundaram