HTML
JPG
CAD
XML
IFC
DXF
แปลง IFC เป็น DXF ผ่าน C #
แปลง IFC เป็น DXF ได้ทันทีโดยไม่ต้องใช้ AutoCAD® หรือซอฟต์แวร์แสดงผลอื่นๆ
ในการแปลง IFC เป็น DXF เราจะใช้ API ของ Aspose.CAD for .NET ซึ่งเป็น API ที่มีคุณลักษณะหลากหลาย มีประสิทธิภาพ และ ง่ายต่อการใช้การจัดการเอกสารและการแปลง API สำหรับแพลตฟอร์ม C# เปิด NuGet package manager ค้นหา Aspose.CAD และติดตั้ง คุณยังสามารถใช้คำสั่งต่อไปนี้จาก Package Manager Console
คำสั่งคอนโซลตัวจัดการแพ็คเกจ
PM> Install-Package Aspose.CAD
ขั้นตอนในการแปลง IFC เป็น DXF ผ่าน C#
- โหลดไฟล์ IFC ด้วย Image.Load method
- ตั้งค่าวัตถุของ CadRasterizationOptions ด้วยความสูง & ความกว้างของหน้า
- สร้างอินสแตนซ์ของคลาส DxfOptions และตั้งค่าคุณสมบัติ VectorRasterizationOptions
- เรียกเมธอด Image.Save ขณะส่งพาธไฟล์ผลลัพธ์ & ออบเจกต์ของ DxfOptions
ข้อกำหนดการแปลง
- Microsoft Windows หรือระบบปฏิบัติการที่เข้ากันได้กับ .NET Framework, .NET Core และ PHP, VBScript, Delphi, C++ ผ่าน COM Interop
- สภาพแวดล้อมการพัฒนาเช่น Microsoft Visual Studio
- Aspose.CAD for .NET DLL ที่อ้างอิงในโครงการของคุณ
โค้ดตัวอย่างนี้แสดง IFC ถึง DXF C# Conversion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// load IFC in an instance of Image via its Load method | |
using (var image = Image.Load("template.ifc")) | |
{ | |
// create an instance of CadRasterizationOptions and set page height & width | |
var rasterizationOptions = new ImageOptions.CadRasterizationOptions() | |
{ | |
PageWidth = 1600, | |
PageHeight = 1600 | |
}; | |
// create an instance of DxfOptions | |
var options = new ImageOptions.DxfOptions(); | |
// set the VectorRasterizationOptions property as CadRasterizationOptions | |
options.VectorRasterizationOptions = rasterizationOptions; | |
// export IFC to DXF | |
image.Save("output.dxf", options); | |
} |
แอพฟรีเพื่อแปลง IFC เป็น DXF
Check our live demos for IFC to DXF conversion with following benefits.
No need to download or setup anything.
No need to write any code.
Just upload your IFC file and hit the "Convert" button.
You will instantly get the download link for resultant DXF file.