Page 1 of 1

Save file

Posted: 15 Nov 2012, 20:38
by roman
Hello,

is there a possibility to save a drawing (opened from a jpg / including some drawing).

When i try to save the image i only can save it as raster image (dxf doesn't work).

I need to save the image so I can open it later and contiue to work on it / also the handles of the entities should'nt be changed.

thank you,
Roman

Re: Save file

Posted: 19 Nov 2012, 11:27
by support
Hello Roman.
JPG image consists of a set of pixels. CAD Import .NET allows to save JPG or other raster image as DXF, but such DXF will contain Image entity only. It will not contain other entities.

Alexander.

Re: Save file

Posted: 19 Nov 2012, 21:00
by roman
In the editor Demo is the possibility to serialize the objects and save as .dat binary file.
This doesn't work in the demo!

Seialization works if only Drawing objects are serialized (if an Imageentity is added there's an error...)
Deserialization always throws the following Error: "Object of type 'System.Int32' cannot be converted to type 'System.Byte'." (Stacktrace below)

How can this be fixed?

Stack Trace:
at System.RuntimeType.CheckValue(Object value, Binder binder, CultureInfo culture, BindingFlags invokeAttr)
at System.Reflection.RtFieldInfo.InternalSetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture, Boolean doVisibilityCheck, Boolean doCheckConsistency)
at System.Runtime.Serialization.FormatterServices.SerializationSetValue(MemberInfo fi, Object target, Object value)
at System.Runtime.Serialization.FormatterServices.PopulateObjectMembers(Object obj, MemberInfo[] members, Object[] data)
at System.Runtime.Serialization.Formatters.Binary.ReadObjectInfo.PopulateObjectMembers(Object obj, Object[] memberData)
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ParseObjectEnd(ParseRecord pr)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
at CADImportNetDemos.CADEditorDemo.MainForm.Deserialize(String fileName) in D:\temp\cadimportnet_7extgi45j34\demo_sources\EditorDemo\C#\EditorForm.cs:line 4249
at CADImportNetDemos.CADEditorDemo.MainForm.miDeserializeEntities_Click(Object sender, EventArgs e) in D:\temp\cadimportnet_7extgi45j34\demo_sources\EditorDemo\C#\EditorForm.cs:line 4182
at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
at System.Windows.Forms.Command.Invoke()
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at CADImportNetDemos.CADEditorDemo.MainForm.Main(String[] args) in D:\temp\cadimportnet_7extgi45j34\demo_sources\EditorDemo\C#\EditorForm.cs:line 1427
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

Re: Save file

Posted: 20 Nov 2012, 13:07
by support
Hello Roman.
Unfortunately serialization/deserialization feature doesn't stable enough within current CAD Import .NET version. We're not recommend to use it until it is updated. We're working on this problem.

Alexander.

Re: Save file

Posted: 20 Nov 2012, 18:43
by roman
Hello,

is there a timeline when this will be fixed?

Thank you.

Re: Save file

Posted: 21 Nov 2012, 17:50
by support
Hello Roman.
Unfortunately we can't provide any timeline for the issue, sorry.

Alexander.

Re: Save file

Posted: 18 Mar 2013, 18:15
by roman
Hello,

do you have a soliution for the serialization / deserialization issue?

Thank you
Roman

Re: Save file

Posted: 19 Mar 2013, 17:40
by support
Hello Roman.
Unfortunately the solution doesn't ready. The issue requires more effots from us than we expected earlier so we suspend it currently. We're working intensively on DWG export feature instead. It planned for release with library version 9.1.

Alexander.

Re: Save file

Posted: 17 Oct 2019, 09:46
by VijayKumar
Is there any improvement in Deserialization?

Re: Save file

Posted: 18 Oct 2019, 09:05
by support
Hello Vijay

Our developers came to a conclusion that it would be impossible to improve the serialization/deserialization with the current configuration of CAD .NET. The work to enhance serialization/deserialization was suspended and there are no plans to restart it in the near future.

Andrey