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

Urgent: How to Extract ole file names from dwg file

1 REPLY 1
Reply
Message 1 of 2
aslam
290 Views, 1 Reply

Urgent: How to Extract ole file names from dwg file

Dear All,
There is a dwg file on disk which have some ole objects. I need to extract ole file names and paths from this Dwg file through programming. Has anybody an idea?

Thanks....
1 REPLY 1
Message 2 of 2
lleandro
in reply to: aslam

Autodesk.AutoCAD.DatabaseServices.ObjectId imgDictID = RasterImageDef.GetImageDictionary(db);
DBDictionary imgDict;
if (imgDictID.OldId == 0)
{
imgDictID = RasterImageDef.CreateImageDictionary(db);
}

// test the image dictionary and the raster before going further

Autodesk.AutoCAD.DatabaseServices.ObjectId TestImgDictID = RasterImageDef.GetImageDictionary(db);
imgDict = (DBDictionary)trans.GetObject(imgDictID, OpenMode.ForRead, false);

foreach (DBDictionaryEntry def2 in imgDict)
{

RasterImageDef rasterDef = (RasterImageDef)trans.GetObject(def2.Value, OpenMode.ForRead, false);
string jpegFilename = rasterDef.SourceFileName;
}

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