New Member
Posts: 1
Registered: ‎10-24-2011
Message 1 of 3 (375 Views)

how to create an ole object with Ole2frame

375 Views, 2 Replies
10-24-2011 08:08 PM

i want to create an ole object linked with a bmp file.but when i create the ole2frame object with the code "ole2frame obj = new ole2frame();",i don't know what to do next.can anybody help me?

Posts: 3
Registered: ‎08-07-2012
Message 2 of 3 (277 Views)

Re: how to create an ole object with Ole2frame

08-07-2012 10:45 AM in reply to: autocadfresher


We need a create an OLE OBJECT  Source Code. Do you have ?

ADN Support Specialist
Posts: 749
Registered: ‎03-21-2011
Message 3 of 3 (249 Views)

Re: how to create an ole object with Ole2frame

08-10-2012 02:54 AM in reply to: kıeslowskı



I had replied to your other post on the same topic.



It is not possible for applications to create an ole object (AcDbOle2Frame/Ole2Frame object) in AutoCAD.


This is explained in the ObjectARX help file in the description for “setOleObject” method and I quote :
“The COleClientItem class used by AutoCAD is a modified version of the class that ships from Microsoft. This means that it is not possible for applications to create their own COleClientItem objects for use by this function. This function can only be used with COleClientItem objects created by AutoCAD (that is, the object from another AcDbOle2Frame object).“


For this reason, the workaround could be to use a drawing file that contains the image as a template and using it in an insert operation.


If it is just an image in the drawing that you want to insert (not a Ole2Frame), you may find this blog post helpful :



Developer Technical Services
Autodesk Developer Network

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.