Community
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<mserioli> wrote in messageHi!
href="news:6059734@discussion.autodesk.com">news:6059734@discussion.autodesk.com...
I'm writing an application that scans in dwg files if there is any OLE
object like xls. I need to get the path of this file. To achieve it I use the
LinkPath property of the Ole2Frame class, but this throws an Exception.
I post a part of my application code:
Transaction tr =
doc.TransactionManager.StartTransaction();
using (tr)
{
BlockTableRecord btr =
(BlockTableRecord)tr.GetObject(btrId,OpenMode.ForRead);
foreach (ObjectId
entId in btr)
{
Entity ent = tr.GetObject(entId, OpenMode.ForRead) as
Entity;
if (ent != null)
{
Ole2Frame ole = ent as Ole2Frame;
if (ole != null)
{
ed.WriteMessage(ole.LinkPath.ToString());
}
}
}
tr.Commit();
}
----
The Exception information
are: address error: 0x79e832f3, thread 0x1570. Error code: 0xc0000005
Can someone help me??
Thanks!!
Marco