Serialized Custom Object to xRecord Can Not Save DWG

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have spent all day searching for the answer to this question, confident that someone has the answer, but everytime I find a similar question, there is never a resolution. Hopefully, we can find an answer this time.
I have polyline that graphically represents a pipe. Obviously, the polyline can not contain data for a pipe: size, material, insulationtype, insulationthickness, schedule, etc. So, I have created a custom object with all of the appropriate properties, methods, events, etc that I need for it to behave as a pipe. My custom object has a reference to the actual polyline with a Handle property stored as a long(since AutoCAD objects can not be serialized). I referenced an AU 2008 class by Jeffery Geer (A Pattern for Storing Structured Data in AutoCAD Entities CP401-2) to get me as far as I am.
My object is marked serializable. I serialize it to binary and attach the binary in 127 byte chunks to the xRecord of the polyline object. My code works AWESOME!!! Thanks Jeffery.
However, as soon as I attach this binary xrecord, I get the following message when I try to save the drawing:
"One or more objects in this drawing cannot be saved to the specified format. The operation was not completed and no file was created”
I assume that since this was an AU course that some one has tried this at some point and knows how to bypass this error, but I can not find anyone willing to admit it. Does anyone here want to stake a claim to my praise?