Free Support Forum - aspose.com

Can't open DXF files

I’ve tried loading multiple DXF files and always get errors. Here is my code:

Console.WriteLine("Setting license");
		Aspose.ThreeD.License license = new Aspose.ThreeD.License();
		license.SetLicense("Aspose.3D.lic");

		System.Reflection.Assembly asm = System.Reflection.Assembly.GetAssembly(typeof(Aspose.ThreeD.Scene));
		Console.WriteLine("Aspose.3d Version: " + asm.FullName);

		asm = System.Reflection.Assembly.GetAssembly(typeof(System.Int32));
		Console.WriteLine(".Net Core Version: " + asm.FullName);


		try
		{
			string fileName = "Animals39.dxf";
			Console.WriteLine("Reading " + fileName);
			var scene = new Scene(fileName);
			Console.WriteLine("Done!");
		}
		catch (Exception ex)
		{
			Console.WriteLine(ex.ToString());
		}

and here is the output:

Setting license
Aspose.3d Version: Aspose.3D, Version=20.3.0.0, Culture=neutral, PublicKeyToken=f071c641d0b4582b
.Net Core Version: System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
Reading Animals39.dxf
Exception thrown: ‘Aspose.ThreeD.ImportException’ in Aspose.3D.dll
Aspose.ThreeD.ImportException: Cannot open this file
at #=zKZbeNQzlV19VeA_Matl33uo=.#=zu3WL9Vo=(#=zm0um$JEckgyk92Wa4WhfrWl_FK4n #=zdIhI3SM=, CancellationToken #=z9ASrcXk=)
at #=q8DPXuEs2ruzrYn5Bb93t6wjuL8f98bYMff_$IEAtBQY=.#=zZe9mOnEyqVoNm_y4lMqQC3Q=(Object #=zaAIvjJ0=)
at #=q8DPXuEs2ruzrYn5Bb93t6wjuL8f98bYMff_$IEAtBQY=.#=z8$GsS_mub8sBj3FTdnZ9s3I=(MethodBase #=zaAIvjJ0=, Boolean #=zwkTkcdc=)
at #=q8DPXuEs2ruzrYn5Bb93t6wjuL8f98bYMff_$IEAtBQY=.#=zyi7LUqXollCRlYujaSXOzr1f45T$LnCiTKmijmI=(#=q8DPXuEs2ruzrYn5Bb93t6wjuL8f98bYMff_$IEAtBQY= #=zaAIvjJ0=, #=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(Object #=zaAIvjJ0=, UInt32 #=zwkTkcdc=)
at #=q8DPXuEs2ruzrYn5Bb93t6wjuL8f98bYMff_$IEAtBQY=.#=zNlnkWizUQQASpzm8$hQZzgw=(Boolean #=zaAIvjJ0=)
at #=q8DPXuEs2ruzrYn5Bb93t6wjuL8f98bYMff_$IEAtBQY=.#=zNlnkWizUQQASpzm8$hQZzgw=(Boolean #=zaAIvjJ0=)
at #=q8DPXuEs2ruzrYn5Bb93t6wjuL8f98bYMff_$IEAtBQY=.#=zEy2OdsP$V5Ks2O2JhTlkrjxJBtTofG3lFFQGNnE=()
at #=q8DPXuEs2ruzrYn5Bb93t6wjuL8f98bYMff_$IEAtBQY=.#=z8pOyALxJZBrpFPaj89lc1KdrJ1PFIPFWD8rqZwItWmpk(Object[] #=zaAIvjJ0=, Type[] #=zwkTkcdc=, Type[] #=zSRoULHQ=, Object[] #=zfZwWqww=)
at #=q8DPXuEs2ruzrYn5Bb93t6wjuL8f98bYMff_$IEAtBQY=.#=zbvsM6fgWngqt6CvJhsEQ9iQ=(Stream #=zaAIvjJ0=, String #=zwkTkcdc=, Object[] #=zSRoULHQ=, Type[] #=zfZwWqww=, Type[] #=z1hNr3J0=, Object[] #=zjAPv_nM=)
at #=q8DPXuEs2ruzrYn5Bb93t6wjuL8f98bYMff_$IEAtBQY=.#=zPkNlGY34lMYeZq8tEiofYIdIsQfo(Stream #=zaAIvjJ0=, String #=zwkTkcdc=, Object[] #=zSRoULHQ=)
at #=q8DPXuEs2ruzrYn5Bb93t6wjuL8f98bYMff_$IEAtBQY=.#=zuwgqBTGXGTN39tEPmsdx0Jc=(Stream #=zaAIvjJ0=, String #=zwkTkcdc=, Object[] #=zSRoULHQ=)
at Aspose.ThreeD.Scene.Open(String fileName, CancellationToken cancellationToken)
at Aspose.ThreeD.Scene…ctor(String fileName)
at Aspose3dTest.Program.Main(String[] args) in D:\Projects\Aspose3dTest\Program.cs:line 32

I’ve tried 5 different dxf files from various sources, all of which open fine in multiple DXF viewers. Here is a link to one which causes the problem:

http://s3.cnccookbook.com/dxf-downloads/Animals39.dxf

@OBCad,

Thank you for the details.

We have logged a ticket with ID THREEDNET-668 in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.

The issues you have found earlier (filed as THREEDNET-668) have been fixed in this update.