RGE SAMG format - Set the Word Attachments to be paginated continuously with the procedure
added code to allow for plant specific modifications to document styles (section styles)
This commit is contained in:
parent
0bf2b5b640
commit
187f98807d
@ -45,6 +45,9 @@ namespace fmtxml
|
|||||||
|
|
||||||
private void AddTPFmt(ref FormatData fmtdata)
|
private void AddTPFmt(ref FormatData fmtdata)
|
||||||
{
|
{
|
||||||
|
/* Under development
|
||||||
|
fmtdata.SectData.StepSectionData.StpSectLayData.TableCenterPos = "146,0,0";
|
||||||
|
* */
|
||||||
// When a plant does not have the TextSubFollowsTextStyle, the 16bit code was adding two characters
|
// When a plant does not have the TextSubFollowsTextStyle, the 16bit code was adding two characters
|
||||||
// before the tab if the parent of this step is a Caution or Note. But the two characters was related
|
// before the tab if the parent of this step is a Caution or Note. But the two characters was related
|
||||||
// to the spaces on the parents tab. The code was very hard to follow. This format variable was
|
// to the spaces on the parents tab. The code was very hard to follow. This format variable was
|
||||||
@ -298,7 +301,7 @@ namespace fmtxml
|
|||||||
////fmtdata.StepData[32].TabData.IdentWid = "65.4";
|
////fmtdata.StepData[32].TabData.IdentWid = "65.4";
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public partial class FmtToXml
|
public partial class FmtToXml
|
||||||
{
|
{
|
||||||
public void AddPlantSpecific(string genFileName, ref PageStyles pgstyles)
|
public void AddPlantSpecific(string genFileName, ref PageStyles pgstyles)
|
||||||
@ -311,6 +314,14 @@ namespace fmtxml
|
|||||||
case "NSP.PAG":
|
case "NSP.PAG":
|
||||||
AddNSPPage(ref pgstyles);
|
AddNSPPage(ref pgstyles);
|
||||||
break;
|
break;
|
||||||
|
/* Under Development
|
||||||
|
case "TP.PAG":
|
||||||
|
AddTPPage(ref pgstyles);
|
||||||
|
break;
|
||||||
|
case "TP.Z00":
|
||||||
|
AddTP00Page(ref pgstyles);
|
||||||
|
break;
|
||||||
|
* */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// NSP_ALL
|
// NSP_ALL
|
||||||
@ -341,6 +352,158 @@ namespace fmtxml
|
|||||||
pgstyles.PgStyles[8].Items[1].Col = -16; // {HEADER1}
|
pgstyles.PgStyles[8].Items[1].Col = -16; // {HEADER1}
|
||||||
pgstyles.PgStyles[8].Items[5].Col = -16; // {BOX4}
|
pgstyles.PgStyles[8].Items[5].Col = -16; // {BOX4}
|
||||||
}
|
}
|
||||||
|
/* Under Development
|
||||||
|
// TP_ALL
|
||||||
|
private void AddTPPage(ref PageStyles pgstyles)
|
||||||
|
{
|
||||||
|
// Procedure Steps
|
||||||
|
pgstyles.PgStyles[0].Items[0].Col = -3; // {DRAFT}{MASTER}....
|
||||||
|
pgstyles.PgStyles[0].Items[1].Col = -54; // {HEADER1}
|
||||||
|
pgstyles.PgStyles[0].Items[1].Row = -13; //{HEADER1}
|
||||||
|
pgstyles.PgStyles[0].Items[2].Col = 465; //{PAGE}
|
||||||
|
pgstyles.PgStyles[0].Items[3].Col = 45; //{EOPNUM}
|
||||||
|
pgstyles.PgStyles[0].Items[4].Col = 249; //{PROCTITLE}
|
||||||
|
pgstyles.PgStyles[0].Items[5].Col = 471; //{REV}
|
||||||
|
pgstyles.PgStyles[0].Items[6].Col = -54; //{BOX1}
|
||||||
|
pgstyles.PgStyles[0].Items[6].Row = -13; //{BOX1}
|
||||||
|
pgstyles.PgStyles[0].Items[7].Col = 255; //{FINALPAGE}
|
||||||
|
|
||||||
|
// cover page
|
||||||
|
pgstyles.PgStyles[1].Items[2].Row = 186; //{UnitText}
|
||||||
|
pgstyles.PgStyles[1].Items[3].Row = 330; //{EOPNUM}
|
||||||
|
pgstyles.PgStyles[1].Items[3].Col = 309; //{EOPNUM}
|
||||||
|
pgstyles.PgStyles[1].Items[4].Row = 576; //{COVERTITLE1}
|
||||||
|
pgstyles.PgStyles[1].Items[4].Col = 309; //{COVERTITEL1}
|
||||||
|
pgstyles.PgStyles[1].Items[5].Row = 594; //{COVERTITLE2}
|
||||||
|
pgstyles.PgStyles[1].Items[5].Col = 309; //{COVERTITEL2}
|
||||||
|
pgstyles.PgStyles[1].Items[6].Row = 636; //"Continuous Use"
|
||||||
|
pgstyles.PgStyles[1].Items[6].Col = 309; //"Continuous Use"
|
||||||
|
pgstyles.PgStyles[1].Items[7].Row = 660; //{Box6}
|
||||||
|
pgstyles.PgStyles[1].Items[7].Col = 57; //{Box6}
|
||||||
|
pgstyles.PgStyles[1].Items[8].Row = 672; //{PS-PROCTYPE}
|
||||||
|
pgstyles.PgStyles[1].Items[8].Col = 291; //{PS-PROCTYPE}
|
||||||
|
pgstyles.PgStyles[1].Items[9].Row = 696; //{PS-RESPDEPT}
|
||||||
|
pgstyles.PgStyles[1].Items[10].Row = 708; //{PS-RESPAPP}
|
||||||
|
|
||||||
|
//unused - Purpose, Symptoms, Reference
|
||||||
|
pgstyles.PgStyles[2].Items[0].Col = -3; // {DRAFT}{MASTER}....
|
||||||
|
pgstyles.PgStyles[2].Items[1].Col = -54; // {HEADER1}
|
||||||
|
pgstyles.PgStyles[2].Items[1].Row = -13; //{HEADER1}
|
||||||
|
pgstyles.PgStyles[2].Items[2].Col = 447; //{PAGE}
|
||||||
|
pgstyles.PgStyles[2].Items[3].Col = 33; //{EOPNUM}
|
||||||
|
pgstyles.PgStyles[2].Items[4].Col = 249; //{PROCTITLE}
|
||||||
|
pgstyles.PgStyles[2].Items[5].Col = 459; //{REV}
|
||||||
|
pgstyles.PgStyles[2].Items[6].Col = -54; //{BOX3}
|
||||||
|
pgstyles.PgStyles[2].Items[6].Row = -13; //{BOX3}
|
||||||
|
pgstyles.PgStyles[2].Items[7].Col = 243; //{FINALPAGE}
|
||||||
|
|
||||||
|
// Single Column Attachments
|
||||||
|
pgstyles.PgStyles[3].Items[0].Col = -3; // {DRAFT}{MASTER}....
|
||||||
|
pgstyles.PgStyles[3].Items[1].Col = -54; // {HEADER1}
|
||||||
|
pgstyles.PgStyles[3].Items[1].Row = -13; //{HEADER1}
|
||||||
|
pgstyles.PgStyles[3].Items[2].Col = 459; //{PAGE}
|
||||||
|
pgstyles.PgStyles[3].Items[3].Col = 39; //{EOPNUM}
|
||||||
|
pgstyles.PgStyles[3].Items[4].Col = 249; //{PROCTITLE}
|
||||||
|
pgstyles.PgStyles[3].Items[5].Col = 459; //{REV}
|
||||||
|
pgstyles.PgStyles[3].Items[6].Col = -54; //{BOX3}
|
||||||
|
pgstyles.PgStyles[3].Items[6].Row = -13; //{BOX3}
|
||||||
|
pgstyles.PgStyles[3].Items[7].Col = 255; //{SECTIONLEVELNUMBER}
|
||||||
|
pgstyles.PgStyles[3].Items[8].Col = 255; //{DOCCURPAGE}
|
||||||
|
pgstyles.PgStyles[3].Items[10].Col = 243; //{FINALPAGE}
|
||||||
|
|
||||||
|
//Two Column Attachments
|
||||||
|
pgstyles.PgStyles[4].Items[0].Col = -3; // {DRAFT}{MASTER}....
|
||||||
|
pgstyles.PgStyles[4].Items[1].Col = -54; // {HEADER1}
|
||||||
|
pgstyles.PgStyles[4].Items[1].Row = -13; //{HEADER1}
|
||||||
|
pgstyles.PgStyles[4].Items[2].Col = 459; //{PAGE}
|
||||||
|
pgstyles.PgStyles[4].Items[3].Col = 39; //{EOPNUM}
|
||||||
|
pgstyles.PgStyles[4].Items[4].Col = 249; //{PROCTITLE}
|
||||||
|
pgstyles.PgStyles[4].Items[5].Col = 459; //{REV}
|
||||||
|
pgstyles.PgStyles[4].Items[6].Col = -54; //{BOX1}
|
||||||
|
pgstyles.PgStyles[4].Items[6].Row = -13; //{BOX1}
|
||||||
|
pgstyles.PgStyles[4].Items[7].Col = 255; //{SECTIONLEVELNUMBER}
|
||||||
|
pgstyles.PgStyles[4].Items[8].Col = 255; //{DOCCURPAGE}
|
||||||
|
pgstyles.PgStyles[4].Items[10].Col = 243; //{FINALPAGE}
|
||||||
|
|
||||||
|
//Ter Editor Attachments
|
||||||
|
pgstyles.PgStyles[5].Items[0].Col = -3; // {DRAFT}{MASTER}....
|
||||||
|
pgstyles.PgStyles[5].Items[1].Col = -54; // {HEADER1}
|
||||||
|
pgstyles.PgStyles[5].Items[1].Row = -13; //{HEADER1}
|
||||||
|
pgstyles.PgStyles[5].Items[2].Col = 447; //{PAGE}
|
||||||
|
pgstyles.PgStyles[5].Items[3].Col = 33; //{EOPNUM}
|
||||||
|
pgstyles.PgStyles[5].Items[4].Col = 237; //{PROCTITLE}
|
||||||
|
pgstyles.PgStyles[5].Items[5].Col = 459; //{REV}
|
||||||
|
pgstyles.PgStyles[5].Items[6].Col = -54; //{BOX3}
|
||||||
|
pgstyles.PgStyles[5].Items[6].Row = -13; //{BOX3}
|
||||||
|
pgstyles.PgStyles[5].Items[7].Col = 237; //{SECTIONLEVELNUMBER}
|
||||||
|
pgstyles.PgStyles[5].Items[8].Col = 237; //{DOCCURPAGE}
|
||||||
|
pgstyles.PgStyles[5].Items[10].Col = 243; //{FINALPAGE}
|
||||||
|
|
||||||
|
//Duplex Foldout Page
|
||||||
|
pgstyles.PgStyles[6].Items[0].Col = -3; // {DRAFT}{MASTER}....
|
||||||
|
pgstyles.PgStyles[6].Items[1].Col = -54; // {HEADER1}
|
||||||
|
pgstyles.PgStyles[6].Items[1].Row = -13; //{HEADER1}
|
||||||
|
pgstyles.PgStyles[6].Items[2].Col = 465; //{PAGE}
|
||||||
|
pgstyles.PgStyles[6].Items[4].Col = 39; //{EOPNUM}
|
||||||
|
pgstyles.PgStyles[6].Items[5].Col = 471; //{REV}
|
||||||
|
pgstyles.PgStyles[6].Items[6].Col = -54; //{BOX3}
|
||||||
|
pgstyles.PgStyles[6].Items[6].Row = -13; //{BOX3}
|
||||||
|
|
||||||
|
//Figures (Ter Editor)
|
||||||
|
pgstyles.PgStyles[7].Items[0].Col = -3; // {DRAFT}{MASTER}....
|
||||||
|
pgstyles.PgStyles[7].Items[1].Col = -54; // {HEADER1}
|
||||||
|
pgstyles.PgStyles[7].Items[1].Row = -13; //{HEADER1}
|
||||||
|
pgstyles.PgStyles[7].Items[2].Col = 447; //{PAGE}
|
||||||
|
pgstyles.PgStyles[7].Items[3].Col = 27; //{EOPNUM}
|
||||||
|
pgstyles.PgStyles[7].Items[4].Col = 237; //{PROCTITLE}
|
||||||
|
pgstyles.PgStyles[7].Items[5].Col = 453; //{REV}
|
||||||
|
pgstyles.PgStyles[7].Items[6].Col = -54; //{BOX3}
|
||||||
|
pgstyles.PgStyles[7].Items[6].Row = -13; //{BOX3}
|
||||||
|
pgstyles.PgStyles[7].Items[7].Col = 243; //{SECTIONLEVELNUMBER}
|
||||||
|
pgstyles.PgStyles[7].Items[8].Col = 243; //{DOCCURPAGE}
|
||||||
|
pgstyles.PgStyles[7].Items[10].Col = 243; //{FINALPAGE}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddTP00Page(ref PageStyles pgstyles)
|
||||||
|
{
|
||||||
|
//Purpose, Symptoms, Reference
|
||||||
|
pgstyles.PgStyles[0].Items[0].Col = -3; // {DRAFT}{MASTER}....
|
||||||
|
pgstyles.PgStyles[0].Items[1].Col = -66; // {HEADER1}
|
||||||
|
pgstyles.PgStyles[0].Items[1].Row = -13; //{HEADER1}
|
||||||
|
pgstyles.PgStyles[0].Items[2].Col = 447; //{PAGE}
|
||||||
|
pgstyles.PgStyles[0].Items[3].Col = 33; //{EOPNUM}
|
||||||
|
pgstyles.PgStyles[0].Items[4].Col = 249; //{PROCTITLE}
|
||||||
|
pgstyles.PgStyles[0].Items[5].Col = 459; //{REV}
|
||||||
|
pgstyles.PgStyles[0].Items[6].Col = -66; //{BOX3}
|
||||||
|
pgstyles.PgStyles[0].Items[6].Row = -13; //{BOX3}
|
||||||
|
|
||||||
|
}
|
||||||
|
* */
|
||||||
|
#region DocStyles
|
||||||
|
public void AddPlantSpecific(string genFileName, ref DocStyles dcstyles)
|
||||||
|
{
|
||||||
|
switch (genFileName.ToUpper())
|
||||||
|
{
|
||||||
|
case "RGESAM1.DOC":
|
||||||
|
AddREGSam1DOC(ref dcstyles);
|
||||||
|
break;
|
||||||
|
case "RGESAM2.DOC":
|
||||||
|
AddREGSam2DOC(ref dcstyles);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddREGSam1DOC(ref DocStyles dcstyles)
|
||||||
|
{
|
||||||
|
dcstyles.DcStyles[4].numberingsequence = 1; // count this section with total document page count
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddREGSam2DOC(ref DocStyles dcstyles)
|
||||||
|
{
|
||||||
|
dcstyles.DcStyles[2].numberingsequence = 1; // count this section with total document page count
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
public partial class RtfToSvg
|
public partial class RtfToSvg
|
||||||
{
|
{
|
||||||
|
@ -1063,6 +1063,9 @@ namespace fmtxml
|
|||||||
// Inherit fonts.
|
// Inherit fonts.
|
||||||
DoDSFontInherit(ref dcstyles);
|
DoDSFontInherit(ref dcstyles);
|
||||||
|
|
||||||
|
// do Plant specific adjustments
|
||||||
|
AddPlantSpecific(fname, ref dcstyles);
|
||||||
|
|
||||||
// First serialize files based on the above - then use xsl to transform
|
// First serialize files based on the above - then use xsl to transform
|
||||||
// into prefered xml.
|
// into prefered xml.
|
||||||
if (!Directory.Exists("fmt_xml")) Directory.CreateDirectory("fmt_xml");
|
if (!Directory.Exists("fmt_xml")) Directory.CreateDirectory("fmt_xml");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user