Posts: 20
Registered: ‎10-07-2004
Message 1 of 3 (206 Views)

How to insert an Image file into an Ole2Frame

206 Views, 2 Replies
10-25-2011 04:28 PM

Could anybody please show me how to insert a jpg file in the autocad drawing file using an Ole2Frame.

I need to show  a logo in the drawing which is embedded (not linked) in the dwg.


Thanks for your help.


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

Re: How to insert an Image file into an Ole2Frame

08-07-2012 10:50 AM in reply to: sylvesp

Do you know your questions resolution thanks

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

Re: How to insert an Image file into an Ole2Frame

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



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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community