Exception: The method is not implemented yet when converting DGN file to PDF (C# .NET)

Hello,
I’m trying to convert DGN to PDF and i’m using this code :

           Console.WriteLine("starting test");
        // load the drawing to be converted
        using (var image = Aspose.CAD.Image.Load("C:/Temp/" + "0001--06.dgn"))
        {
            // create an instance of CadRasterizationOptions & set resultant page size
            var rasterizationOptions = new Aspose.CAD.ImageOptions.CadRasterizationOptions()
            {
                PageSize = new Aspose.CAD.SizeF(1200, 1200),
            };
            // save resultant PDF
            image.Save("C:/Temp/" + "output.pdf", new Aspose.CAD.ImageOptions.PdfOptions() { VectorRasterizationOptions = rasterizationOptions });
        }

At the line Aspose.CAD.Image.Load(“C:/Temp/” + “0001–06.dgn”) i got a not implemented exception.

This code is picked from aspose website, so it should works.

Can someone please explain me why it doesn’t work ?

Regards

@DGNBoy,

Can you please share source file so that we may further investigate to help you out.

0001–06.zip (138.4 KB)

Hello,
Please find attached the file.
It’s microstation V7 if it can help.

Regards

I have also tried with this method from Exporting DGN AutoCAD|Documentation :
> private static void CadToPdf3()

        {
            using (DgnImage dgnImage = (DgnImage)Image.Load("C:/Temp/test.dgn"))
            {
                var options = new PdfOptions
                {
                    VectorRasterizationOptions = new CadRasterizationOptions
                    {
                        PageWidth = 1500,
                        PageHeight = 1500,
                        CenterDrawing = true,
                        AutomaticLayoutsScaling = true,
                        BackgroundColor = Color.Black,
                        Layouts = new string[] { "1", "2", "3", "9" }//only export 4 (1,2,3 and 9) views
                    }
                };

                dgnImage.Save("C:/Temp/" + "output.pdf", options);
            }
        }
    }

I got also an error when loading the image:
Aspose.CAD.CadExceptions.ImageLoadException
HResult=0x80131500
Message=Image loading failed.
Source=Aspose.CAD

Inner Exception 1:
FormatException: ElementData

Please help.

@DGNBoy,

I have worked with the file shared by you and have been able to observe the issue specified. An issue with ID CADNET-778 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

Thanks for your reply.
When should i expect a resolve for this issue ?

@DGNBoy

The issue has just been added in our issue tracking system and is pending in issues queue. We request for your patience till the time the issue gets scheduled and resolved on our end.