I am working on a autoCAD .net project in which I create a MVVM pattern to select and modify an entity. I want to store the selected entity 's info/values into the view model, change the info/values (through the WPF UI that pops up and through my code as well) then apply the changes to the entity.
The problem is: if I want to apply the changes to the entity, I have to know "which" entity will receive the changes. Thus, I want to store the entity ObjectId and retrieve it later WITHOUT using ObjectId struct from acdbmgd.dll of AutoCAD since that will make my UI project depends on a specific version of AutoCAD (Yes, it is a REQUIREMENT that my UI project works on .net framework alone).
Is there any way I can do this? I intend to store the objectId in an object then cast it back to objecId but it didn't work. Please help. Thank you very much.