main
李建辉 1 month ago
parent a66c9b929e
commit 88978db638

@ -88,23 +88,23 @@ namespace connor_zwcadm.commands
try
{
KUtil.Log("plotData.TitleBlockName====" + plotData.TitleBlockName);
if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A4portrait", StringComparison.OrdinalIgnoreCase) >= 0)
if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A4", StringComparison.OrdinalIgnoreCase) >= 0 && plotData.TitleBlockName.IndexOf("portrait", StringComparison.OrdinalIgnoreCase) >= 0)
{
psv.SetPlotConfigurationName(ps, "A4S.pc5", null);
}
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A4landscape", StringComparison.OrdinalIgnoreCase) >= 0)
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A4", StringComparison.OrdinalIgnoreCase) >= 0 && plotData.TitleBlockName.IndexOf("landscape", StringComparison.OrdinalIgnoreCase) >= 0)
{
psv.SetPlotConfigurationName(ps, "A4H.pc5", null);
}
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A3landscape", StringComparison.OrdinalIgnoreCase) >= 0)
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A3", StringComparison.OrdinalIgnoreCase) >= 0 && plotData.TitleBlockName.IndexOf("landscape", StringComparison.OrdinalIgnoreCase) >= 0)
{
psv.SetPlotConfigurationName(ps, "A3H.pc5", null);
}
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A2landscape", StringComparison.OrdinalIgnoreCase) >= 0)
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A2", StringComparison.OrdinalIgnoreCase) >= 0 && plotData.TitleBlockName.IndexOf("landscape", StringComparison.OrdinalIgnoreCase) >= 0)
{
psv.SetPlotConfigurationName(ps, "A2H.pc5", null);
}
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A1landscape", StringComparison.OrdinalIgnoreCase) >= 0)
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A1", StringComparison.OrdinalIgnoreCase) >= 0 && plotData.TitleBlockName.IndexOf("landscape", StringComparison.OrdinalIgnoreCase) >= 0)
{
psv.SetPlotConfigurationName(ps, "A1H.pc5", null);
}
@ -127,23 +127,23 @@ namespace connor_zwcadm.commands
KUtil.Log("1111111111111111111");
if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A4portrait", StringComparison.OrdinalIgnoreCase) >= 0)
if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A4", StringComparison.OrdinalIgnoreCase) >= 0 && plotData.TitleBlockName.IndexOf("portrait", StringComparison.OrdinalIgnoreCase) >= 0)
{
psv.SetPlotConfigurationName(ps, "A4S.pc5", null);
}
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A4landscape", StringComparison.OrdinalIgnoreCase) >= 0)
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A4", StringComparison.OrdinalIgnoreCase) >= 0 && plotData.TitleBlockName.IndexOf("landscape", StringComparison.OrdinalIgnoreCase) >= 0)
{
psv.SetPlotConfigurationName(ps, "A4H.pc5", null);
}
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A3landscape", StringComparison.OrdinalIgnoreCase) >= 0)
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A3", StringComparison.OrdinalIgnoreCase) >= 0 && plotData.TitleBlockName.IndexOf("landscape", StringComparison.OrdinalIgnoreCase) >= 0)
{
psv.SetPlotConfigurationName(ps, "A3H.pc5", null);
}
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A2landscape", StringComparison.OrdinalIgnoreCase) >= 0)
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A2", StringComparison.OrdinalIgnoreCase) >= 0 && plotData.TitleBlockName.IndexOf("landscape", StringComparison.OrdinalIgnoreCase) >= 0)
{
psv.SetPlotConfigurationName(ps, "A2H.pc5", null);
}
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A1landscape", StringComparison.OrdinalIgnoreCase) >= 0)
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A1", StringComparison.OrdinalIgnoreCase) >= 0 && plotData.TitleBlockName.IndexOf("landscape", StringComparison.OrdinalIgnoreCase) >= 0)
{
psv.SetPlotConfigurationName(ps, "A1H.pc5", null);
}
@ -152,7 +152,6 @@ namespace connor_zwcadm.commands
psv.SetPlotConfigurationName(ps, "DWG to PDF.pc5", null);
}
flag = false;
break;
}
@ -161,23 +160,23 @@ namespace connor_zwcadm.commands
if (flag)
{
if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A4portrait", StringComparison.OrdinalIgnoreCase) >= 0)
if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A4", StringComparison.OrdinalIgnoreCase) >= 0 && plotData.TitleBlockName.IndexOf("portrait", StringComparison.OrdinalIgnoreCase) >= 0)
{
psv.SetPlotConfigurationName(ps, "A4S.pc5", null);
}
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A4landscape", StringComparison.OrdinalIgnoreCase) >= 0)
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A4", StringComparison.OrdinalIgnoreCase) >= 0 && plotData.TitleBlockName.IndexOf("landscape", StringComparison.OrdinalIgnoreCase) >= 0)
{
psv.SetPlotConfigurationName(ps, "A4H.pc5", null);
}
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A3landscape", StringComparison.OrdinalIgnoreCase) >= 0)
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A3", StringComparison.OrdinalIgnoreCase) >= 0 && plotData.TitleBlockName.IndexOf("landscape", StringComparison.OrdinalIgnoreCase) >= 0)
{
psv.SetPlotConfigurationName(ps, "A3H.pc5", null);
}
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A2landscape", StringComparison.OrdinalIgnoreCase) >= 0)
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A2", StringComparison.OrdinalIgnoreCase) >= 0 && plotData.TitleBlockName.IndexOf("landscape", StringComparison.OrdinalIgnoreCase) >= 0)
{
psv.SetPlotConfigurationName(ps, "A2H.pc5", null);
}
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A1landscape", StringComparison.OrdinalIgnoreCase) >= 0)
else if (!string.IsNullOrEmpty(plotData.TitleBlockName) && plotData.TitleBlockName.IndexOf("A1", StringComparison.OrdinalIgnoreCase) >= 0 && plotData.TitleBlockName.IndexOf("landscape", StringComparison.OrdinalIgnoreCase) >= 0)
{
psv.SetPlotConfigurationName(ps, "A1H.pc5", null);
}

@ -172,6 +172,8 @@ namespace connor_zwcadm.commands {
Dictionary<string, string> cadProps = tcUtil.ReadTCData2(titleData,th,bb);
if (cadProps != null) {
KUtil.Log("--------------1" + KUtil.PrintDictionary(cadProps));
@ -258,6 +260,7 @@ namespace connor_zwcadm.commands {
KUtil.Log("事务已提交,属性修改生效");
}
}
KUtil.Log("转换PDF完成属性已预设置");
return path;
}

@ -479,6 +479,7 @@ namespace connor_zwcadm.util {
KUtil.Log(string.Format("查询TC数据类型[{0}] ID[{1}] 版本[{2}] 名称[{3}]", itemTypeName, itemId, revId, ""));
ItemRevision rev = null;
ItemRevision rev2 = null;
if (string.IsNullOrWhiteSpace(itemId))
{
throw new Exception("参数异常对象ID不可为空");
@ -519,17 +520,17 @@ namespace connor_zwcadm.util {
KUtil.Log("referencedObject.Object_type" + referencedObject.Object_type);
if (referencedObject.Object_type.Equals("Lb5_ChangeNoticeRevision"))
{
rev = (ItemRevision)referencedObject;
rev2 = (ItemRevision)referencedObject;
}
}
}
GetProperties(rev, "object_string");
KUtil.Log("找到已存在的版本:" + rev.Object_string);
if (rev2 != null) {
data.Rev = rev2;
}
//更新属性
data.Rev = rev;
return ReadProperties(data);
}

Loading…
Cancel
Save