几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】oddbole2frame, getlinkpath, getlinkname (http://www.dimcax.com/hust/showthread.php?t=17573)

yang686526 2009-05-06 07:59 PM

【转帖】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


所有的时间均为北京时间。 现在的时间是 06:20 PM.