Anuncios

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

Insert Block In Autocad Using C#

sundaram1087
Advocate

Insert Block In Autocad Using C#

sundaram1087
Advocate
Advocate

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

 

0 Me gusta
Responder
859 Vistas
2 Respuestas
Respuestas (2)

ilia.borisov
Collaborator
Collaborator
Are you trying to insert already existing block or you first create block and then try to insert it with that method?
0 Me gusta

sundaram1087
Advocate
Advocate

Hi

 

Existing block only

 

Regards 

Shunmugasundaram

 

0 Me gusta