Store a C# Object into an AutoCAD entity's XRecord -


i'm trying find way can store c# class autocad entity xrecord. example, have following class:

public class exampleclass {     private int x;     private int y;      public exampleclass(int x, int y)     {          this.x = x;          this.y = y;     }      #region getters , setters } 

and create instance of it:

exampleclass objtostoreinxrecord = new exampleclass(3, 5); 

what best way store autocad entity's (for example line in drawing) xrecord this:

exampleclass objrecoveredfromxrecord = getxrecordfromentity(entity e) 

where getxrecordfromentity(entity e) helper method can write takes entity e, gets xrecord of object stored earlier, , returns it.

i don't have handle on how xrecord works , how xrecord relates autocad's named object dictionary (nod). i've seen implementations object stored in xrecord serialized binary formatter , serialized data stored in entity's xrecord i'm looking better way.

serialize object , add xrecord. works perfectly.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -