高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】oddbole2frame, getlinkpath, getlinkname
oddbole2frame, getlinkpath, getlinkname
oddbole2frame, getlinkpath, getlinkname
hi there,
i have a program that enumerates all blocks/objects/elements in a dwg, and allows me to read (and optionally modify) the names of xrefs and raster attachments. this all works fine.
i'm now trying to add the same functionality for ole-linked files. however, although my code is finding the oddbole2frame objects, when i call getlinkpath() or getlinkname() for these objects, i get blank strings returned to me, and the ole link type (gettype()) is returned as "kunknown".
any idea why?
thanks.
to get access to this data you need use oleitemhandler module.
extensions/win/oleitemhandler contains its implementation for windows.
sergey slezkin
thanks, i now have this working correctly!
i have one more question, though ... it is possible to alter the name of an ole *linked* file through this api? for example, i have an ole link to a bitmap file called "c:\mybitmap.bmp" ... is there anything in the api that could allow me to change the name of the linked file to "c:\anotherbitmap.bmp"? i don't think there is, but maybe you could verify that for me.
thanks again.
it's possible only implicitely via setcompounddocument()
sergey slezkin
|