在Web服务器上安全批量转换您的CAD文件为图像。
Windows
2000/2003/Vista/7/8/10/11
and
2012/2016/2019/2022 Server
and
Docker/Citrix/Wine
Total CAD ConverterX (SDK) 可以在网络服务器上将 CAD 文件转换为 PDF、TIFF、JPEG、BMP、WMF、PNG、DXF、BMP。该程序没有图形用户界面或任何干扰信息。源格式的列表相当广泛:dxf、dwg、dwf、plt、hg、hgl、hpg、plo、hp、hpl、hpgl、hp1、hp2、hpgl2、gl2、spl、prn、svg、cgm。Total CAD Converter X (SDK) 包括命令行转换器和 ActiveX。
Total CAD ConverterX 具有独特的选项,可以一次批量转换多个 CAD 文件:
在寻找基于服务器的解决方案?探索一系列以卓越性能为目标的服务器产品,请访问CoolUtils Server Products。
如果您需要编程语言的示例,请联系我们。我们会为您创建任何示例。
string src="C:\\test\\Source.dwg"; string dest="C:\\test\\Dest.PDF"; CADConverterX Cnv = new CADConverterX(); Cnv.Convert(src, dest, "-c PDF -log c:\\test\\CAD.log"); MessageBox.Show("转换完成!");
public static class Function1 { [FunctionName("Function1")] public static async TaskRun( [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req, ILogger log) { StringBuilder sbLogs = new StringBuilder(); sbLogs.AppendLine("started..."); try { ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.CreateNoWindow = true; startInfo.UseShellExecute = false; var assemblyDirectoryPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); assemblyDirectoryPath = assemblyDirectoryPath.Substring(0, assemblyDirectoryPath.Length - 4); var executablePath = $@"{assemblyDirectoryPath}\Converter\CADConverterX.exe"; sbLogs.AppendLine(executablePath + "..."); var msgPath = $@"{assemblyDirectoryPath}\MSG\MSG-1.dwg"; var outPath = Path.GetTempFileName() + ".pdf"; startInfo.FileName = executablePath; if (File.Exists(outPath)) { File.Delete(outPath); } if (File.Exists(executablePath) && File.Exists(msgPath)) { sbLogs.AppendLine("files exists..."); } else sbLogs.AppendLine("EXE & MSG files NOT exists..."); startInfo.WindowStyle = ProcessWindowStyle.Hidden; startInfo.Arguments = $"{msgPath} {outPath}"; using (Process exeProcess = Process.Start(startInfo)) { sbLogs.AppendLine($"wait...{DateTime.Now.ToString()}"); exeProcess.WaitForExit(); sbLogs.AppendLine($"complete...{DateTime.Now.ToString()}"); } int sleepCounter = 10; while(!File.Exists(outPath) && sleepCounter > 0) { System.Threading.Thread.Sleep(1000); sbLogs.AppendLine("sleep..."); sleepCounter--; } if (File.Exists(outPath)) sbLogs.AppendLine("Conversion complete successfully."); } catch (Exception ex) { sbLogs.AppendLine(ex.ToString()); } return new OkObjectResult(sbLogs); } }
dim C Set C=CreateObject("CADConverter.CADConverterX") C.Convert "c:\test\source.dwg", "c:\test\dest.pdf", "-cPDF -log c:\test\CAD.log" Response.Write C.ErrorMessage set C = nothing
dim C Set C=CreateObject("CADConverter.CADConverterX") Response.Clear Response.AddHeader "Content-Type", "binary/octet-stream" Rresponse.AddHeader "Content-Disposition", "attachment; filename=test.pdf" Response.BinaryWrite c.ConvertToStream("C:\www\ASP\Source.dwg", "C:\www\ASP", "-cpdf -log c:\html.log") set C = nothing
PHP 示例: $src="C:\\test\\test.dwg"; $dest="C:\\test\\test.pdf"; if (file_exists($dest)) unlink($dest); $c= new COM("CADConverter.CADConverterX"); $c->convert($src,$dest, "-c pdf -log c:\\test\\Mail.log"); if (file_exists($dest)) echo "OK"; else echo "fail:".$c->ErrorMessage;
require 'win32ole' c = WIN32OLE.new('CADConverter.CADConverterX') src="C:\\test\\test.dwg"; dest="C:\\test\\test.pdf"; c.convert(src,dest, "-c PDF -log c:\\test\\CAD.log"); if not File.exist?(dest) puts c.ErrorMessage end
import win32com.client import os.path c = win32com.client.Dispatch("CADConverter.CADConverterX") src="C:\\test\\test.dwg"; dest="C:\\test\\test.pdf"; c.convert(src, dest, "-c PDF -log c:\\test\\CAD.log"); if not os.path.exists(file_path): print(c.ErrorMessage)
uses Dialogs, Vcl.OleAuto; var c: OleVariant; begin c:=CreateOleObject('CADConverter.CADConverterX'); C.Convert('c:\test\source.dwg', 'c:\test\dest.pdf', '-cPDF -log c:\test\CAD.log'); IF c.ErrorMessage<> Then ShowMessage(c.ErrorMessage); end;
var c = new ActiveXObject("CADConverter.CADConverterX"); c.Convert("C:\\test\\source.dwg", "C:\\test\\dest.pdf", "-c PDF"); if (c.ErrorMessage!="") alert(c.ErrorMessage)
use Win32::OLE; my $src="C:\\test\\test.dwg"; my $dest="C:\\test\\test.pdf"; my $c = CreateObject Win32::OLE 'CADConverter.CADConverterX'; $c->convert($src,$dest, "-c pdf -log c:\\test\\CAD.log"); print $c->ErrorMessage if -e $dest;
"使用这个软件非常有帮助。我们有很多旧的.plt文件,若没有这样的软件帮助,我们就无法再打开它们了。我发现Total CAD Converter非常易于使用。谢谢!"
Brian Litherland, PE
首席工程师 交通设计
www.lochgroup.com
"我使用Inkscape运行激光切割机。Inkscape的确能以PLT文件导出,但通常非常不稳定,往往失败。我曾使用另一个免费转换器,但导出文件的质量很差——大多数曲线都是弯曲的。Total CAD Converter转换成平滑的曲线并提供许多其他导出选项。"
Calida Hartley