How i can save my bin files in dwg?

How i can save my bin files in dwg?

Anonymous
Not applicable
960 Views
2 Replies
Message 1 of 3

How i can save my bin files in dwg?

Anonymous
Not applicable

Hello! How can I store a file, for example, in the bin format in a dwg drawing? Or associate the file with the object (and perhaps store this file in the object)? Thanks a lot!

0 Likes
961 Views
2 Replies
Replies (2)
Message 2 of 3

tbrammer
Advisor
Advisor

Here are some suggestions to try:

 

  1. Via OLE using an AcDbOle2FrameAcDbOle2Frame is derived from AcDbEntity.
    Looks like you have to create a COleClientItem (MFC class) and call 
    AcDbOle2Frame::setOleClientItem(oleItem).
  2. Using an AcDbXRecord. You must break your binary data into resbufs that contain up to 127-byte chunks.
    Probably the easiest solution.
  3. Using a custom object. Derive your own class from AcDbObject and implement dwgInFields()
    and dwgOutFields().

I never tried any of these ways myself to store binary data. But I think #2 would be my first choice to try.


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

Message 3 of 3

dgorsman
Consultant
Consultant

Keep in mind, when an outside agency finds "mystery data" (encrypted, binary, or otherwise not easily readable) in a drawing file they may strip it out if not reject the file altogether.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


0 Likes