I’m trying to convert an ifc
file to a PNG, but I get the following error:
Aspose.CAD.CadExceptions.ImageLoadException: Drawing loading failed: Unexpected character '\"' at [769:32]\n ---> Aspose.CAD.FileFormats.Stp.Reader.StepReadException: Unexpected character '\"' at [769:32]\n at #=zd_TOMrciFU5dfhPZOg$4x2yqF7FWXyePhiKRWEw=.#=zwt1QFO5k94x6uXgWig==.MoveNext()\n at #=zgJebeoqFRepQNSFJICTRG7wRnU4tyoicUowEPg0=.#=zVlI_Alo=()\n at #=zgJebeoqFRepQNSFJICTRG7wRnU4tyoicUowEPg0=.#=zPQzM7h0YOFB5()\n at #=zgJebeoqFRepQNSFJICTRG7wRnU4tyoicUowEPg0=.#=zgL4n4NOJVQBh()\n at #=zgJebeoqFRepQNSFJICTRG7wRnU4tyoicUowEPg0=.#=zrGQwtDYtd4w9()\n at #=zgJebeoqFRepQNSFJICTRG7wRnU4tyoicUowEPg0=.#=z24kioLPKHDMI()\n at #=zgJebeoqFRepQNSFJICTRG7wRnU4tyoicUowEPg0=.#=zomGFYI8EDEIe()\n at #=z6KpLY_Uqq8qr2$NjclnyvZ8NuLvroNSMVktlCtg=.#=z$bmnRrU=()\n at #=zDCCdFW87SSZ7PaGLW28nr1km1x93X7108_a3GbM=.#=zMMkMAo0=(StreamContainer #=zmbALnihbDsrM, LoadOptions #=zEoGjoEF7DIzu)\n at Aspose.CAD.Image.#=zyFePX9YP1$fm(StreamContainer #=zmbALnihbDsrM, LoadOptions #=zEoGjoEF7DIzu)\n --- End of inner exception stack trace ---\n at Aspose.CAD.Image.#=zyFePX9YP1$fm(StreamContainer #=zmbALnihbDsrM, LoadOptions #=zEoGjoEF7DIzu)\n at Aspose.CAD.Image.Load(Stream stream, LoadOptions loadOptions)\n at Aspose.CAD.Image.Load(Stream stream)
I’m using the following code to convert the ifc
file:
var image = Image.Load(input.Stream);
await image.SaveAsync(outputStream, new PngOptions
{
ResolutionSettings = new ResolutionSetting(image.Height, image.Width),
VectorRasterizationOptions = new CadRasterizationOptions
{
DrawType = CadDrawTypeMode.UseObjectColor
},
CancellationToken = cancellationToken,
});
This is the ifc
file that I’m trying to convert:
ifc.7z (6.5 KB)