Here's an example to start with.
public void CopyBlock(string sourceFileName, string blockName)
{
try
{
using(Database sourceDatabase =
GetDatabaseFromFile(sourceFileName))
{
HostApplicationServices.WorkingDatabase.Insert(blockName, sourceDatabase,
false);
}
}
catch (Autodesk.AutoCAD.Runtime.Exception e)
{
//Application.ShowAlertDialog(e.Message);
}
}
public Database GetDatabaseFromFile(string fileName)
{
Database databaseFromFile = new Database(false, true);
databaseFromFile.ReadDwgFile(fileName, System.IO.FileShare.None,
false, null);
return databaseFromFile;
}
--
Bobby C. Jones
http://www.acadx.com
wrote in message news:5007941@discussion.autodesk.com...
hi,
I am unable to copy a block from one ACAD drawing to another can any one
help me on this.
thanks in advance
namrata