NULL reference exception loading PLT
Posted: 19 Dec 2008, 19:46
The code is fairly straightforward:
CADImage img = new HPGL2.HPGLImage();
img.LoadFromFile(mypltfilename);
Error is: Object reference not set to an instance of an object.
CADImport.dll!..(System.Drawing.Color = "{Name=ff000000, ARGB=(255, 0, 0, 0)}", CADImport.CADLineType = null) + 0x6c bytes
CADImport.dll!..(CADImport.CADEntity = {CADImport.CADPolyLine}) + 0xd0 bytes
CADImport.dll!..() + 0x1057 bytes
CADImport.dll!..(ushort = 20549) + 0x366 bytes
CADImport.dll!..(string = "68.PLT") + 0x208 bytes
CADImport.dll!CADImport.HPGL2.HPGLImage.LoadFromFile(string path = "68.PLT") + 0x58 bytes
If I load this same PLT file into the viewer, or the EditorDemo application, it loads just fine. The same code loading a different filetype, such as a DWG using DWGImage() also loads just fine.
CADImage img = new HPGL2.HPGLImage();
img.LoadFromFile(mypltfilename);
Error is: Object reference not set to an instance of an object.
CADImport.dll!..(System.Drawing.Color = "{Name=ff000000, ARGB=(255, 0, 0, 0)}", CADImport.CADLineType = null) + 0x6c bytes
CADImport.dll!..(CADImport.CADEntity = {CADImport.CADPolyLine}) + 0xd0 bytes
CADImport.dll!..() + 0x1057 bytes
CADImport.dll!..(ushort = 20549) + 0x366 bytes
CADImport.dll!..(string = "68.PLT") + 0x208 bytes
CADImport.dll!CADImport.HPGL2.HPGLImage.LoadFromFile(string path = "68.PLT") + 0x58 bytes
If I load this same PLT file into the viewer, or the EditorDemo application, it loads just fine. The same code loading a different filetype, such as a DWG using DWGImage() also loads just fine.