几何尺寸与公差论坛------致力于产品几何量公差标准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 (http://www.dimcax.com/hust/showthread.php?t=17574)

yang686526 2009-05-06 08:00 PM

【转帖】oddbole2frame
 
oddbole2frame
oddbole2frame
hallo!
i tried so much, but nothing worked: i would like to get the coleclientitem or the coledataobject from an oddbole2frame.
in arx, there is the following available:
code:
coleclientitem* poleitem = (coleclientitem*)pole->getoleobject();
how can i do it with dwgdirect?
thanks for any help or suggestion
woho
here is some of my code for when i retrieve data from the ole object and write out the compound document to a temporary file.
odoleitemhandlerbase *ph;
oddbole2frameptr pole;
odbytedataptr pbytedata;
// open the object so we can write to it
pole->upgradeopen();
ph = (odoleitemhandlerbase *)pole->getitemhandler();
// place the binary data into the temporary file
{
odstreambufptr pbuf;
pbuf = odsystemservices()->createfile(location, oda::kfilewrite,
oda::ksharedenyreadwrite,oda::kcreatealways);
pole->getcompounddocument (*pbuf);
}
hope this helps.
quote:
originally posted by woho
hallo!
...
in arx, there is the following available:
code:
coleclientitem* poleitem = (coleclientitem*)pole->getoleobject();
how can i do it with dwgdirect?
thanks for any help or suggestion
woho
hi!
odamfcapp example illustrates using of user-defined ole handler (it's implemented using coleclientitem and coledocument mfc classes).
so there you can cast statically from odoleitemhandler to coleclientitem.
please, see odamfcapp example (ole.cpp).
thanks for your help. no, it works. the main problem was to get the ole-data to the coleclientitem.
woho


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