Serializzation not work

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
Razzo
Posts: 13
Joined: 22 Dec 2009, 17:51
Location: Udine, Italy
Contact:

Serializzation not work

Post by Razzo » 07 Jan 2010, 11:49

In help file the class CADEntity is marked as serializzable.
When i try to serialize this object i get the following error:
- $exception {"There was an error reflecting type 'CADImport.FlatPoly'."} System.Exception {System.InvalidOperationException}
- InnerException {"Cannot serialize member 'CADImport.CADEntity.DrawEvent' of type 'CADImport.EventHandler', see inner exception for more details."} System.Exception {System.InvalidOperationException}
Message "CADImport.EventHandler cannot be serialized because it does not have a parameterless constructor." string

It is a bug?

I want to serialize CADImage object and all the content. How can i do that?

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: Serializzation not work

Post by support » 11 Jan 2010, 17:47

Hello.
You wrote
I want to serialize CADImage object and all the content.
But why you tried to serialize CADEntity object? CADEntity class have only purpose the implementation functional for descendant entities' classes. Why you create object of CADEntity? Did you tried to serialize CADImage object only?

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Razzo
Posts: 13
Joined: 22 Dec 2009, 17:51
Location: Udine, Italy
Contact:

Re: Serializzation not work

Post by Razzo » 12 Jan 2010, 11:12

CADImage is marked not serializzable :!:

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: Serializzation not work

Post by support » 14 Jan 2010, 16:06

Hello.
Did you tried to serialize entities from any drawing, and if so did you succeeded?

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply