没有合适的资源?快使用搜索试试~ 我知道了~
CAD转换JPG
资源推荐
资源详情
资源评论
private static AcadApplication _app = null;
public static void Dwg2Pdf(string filename, string destPath)
{
AcadDocument doc = null;
try
{
doc = _app.Documents.Open(filename, true);
doc.SetVariable("sdi", 0);
doc.SetVariable("Filedia", 0);
doc.SetVariable("RASTERPREVIEW", 1);
doc.SetVariable("BACKGROUNDPLOT", 0);
doc.ActiveLayout.ConfigName = "PublishToWeb JPG.pc3";
doc.ActiveLayout.UseStandardScale = true;
doc.ActiveLayout.StandardScale = AcPlotScale.acScaleToFit;
//设置打印图纸大小
string[] cMNameLst = (string[])doc.ActiveLayout.GetCanonicalMediaNames();
foreach (string name in cMNameLst)
{
//查找纸张大小
if (name.Contains("3840.00") && name.Contains("3840.00"))
{
doc.ActiveLayout.CanonicalMediaName = name;
break;
}
}
doc.ActiveLayout.PlotType = AcPlotType.acExtents;
doc.ActiveLayout.PlotWithLineweights = true;
doc.ActiveLayout.CenterPlot = true;
public static void Dwg2Pdf(string filename, string destPath)
{
AcadDocument doc = null;
try
{
doc = _app.Documents.Open(filename, true);
doc.SetVariable("sdi", 0);
doc.SetVariable("Filedia", 0);
doc.SetVariable("RASTERPREVIEW", 1);
doc.SetVariable("BACKGROUNDPLOT", 0);
doc.ActiveLayout.ConfigName = "PublishToWeb JPG.pc3";
doc.ActiveLayout.UseStandardScale = true;
doc.ActiveLayout.StandardScale = AcPlotScale.acScaleToFit;
//设置打印图纸大小
string[] cMNameLst = (string[])doc.ActiveLayout.GetCanonicalMediaNames();
foreach (string name in cMNameLst)
{
//查找纸张大小
if (name.Contains("3840.00") && name.Contains("3840.00"))
{
doc.ActiveLayout.CanonicalMediaName = name;
break;
}
}
doc.ActiveLayout.PlotType = AcPlotType.acExtents;
doc.ActiveLayout.PlotWithLineweights = true;
doc.ActiveLayout.CenterPlot = true;
资源评论
Kem_south
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功