.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to create an ole object with Ole2frame

2 REPLIES 2
Reply
Message 1 of 3
autocadfresher
1619 Views, 2 Replies

how to create an ole object with Ole2frame

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?

Tags (1)
2 REPLIES 2
Message 2 of 3

Hi

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

Message 3 of 3
Balaji_Ram
in reply to: kıeslowskı

Hello,

 

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 :

http://adndevblog.typepad.com/autocad/2012/05/how-to-insert-a-rasterimage-using-the-net-api.html

>>>



Balaji
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost