From 6359662989bfb03eacabb5d67e7f038889ba35ce Mon Sep 17 00:00:00 2001 From: AJ Sebastian Date: Mon, 11 Feb 2019 11:41:40 -0500 Subject: [PATCH 1/2] Added two example schemas, updated readme --- .../Import/Method/labs_PartLinkGenerator.xml | 58 ++ .../tp_XmlSchema/Image Size Example.xml | 549 ++++++++++++++++++ .../Import/tp_XmlSchema/Link Example.xml | 270 +++++++++ README.md | 32 +- 4 files changed, 908 insertions(+), 1 deletion(-) create mode 100644 Import/CustomTechDocs/Import/Method/labs_PartLinkGenerator.xml create mode 100644 Import/CustomTechDocs/Import/tp_XmlSchema/Image Size Example.xml create mode 100644 Import/CustomTechDocs/Import/tp_XmlSchema/Link Example.xml diff --git a/Import/CustomTechDocs/Import/Method/labs_PartLinkGenerator.xml b/Import/CustomTechDocs/Import/Method/labs_PartLinkGenerator.xml new file mode 100644 index 0000000..86b0a5c --- /dev/null +++ b/Import/CustomTechDocs/Import/Method/labs_PartLinkGenerator.xml @@ -0,0 +1,58 @@ + + + 2618D6F5A90949BAA7E920D1B04C7EE1 + + C# + labs_PartLinkGenerator + + \ No newline at end of file diff --git a/Import/CustomTechDocs/Import/tp_XmlSchema/Image Size Example.xml b/Import/CustomTechDocs/Import/tp_XmlSchema/Image Size Example.xml new file mode 100644 index 0000000..9171cc1 --- /dev/null +++ b/Import/CustomTechDocs/Import/tp_XmlSchema/Image Size Example.xml @@ -0,0 +1,549 @@ + + + tp_Block + <xs:schema xmlns="http://www.aras.com/TechDocExample" targetNamespace="http://www.aras.com/TechDocExample" xmlns:aras="http://aras.com/ArasTechDoc" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + <xs:import namespace="http://www.w3.org/XML/1998/namespace"/> + <xs:import namespace="http://aras.com/ArasTechDoc"/> + + <xs:element name="Standard-Doc"> + <xs:complexType> + <xs:sequence> + <xs:element ref="Title"/> + <xs:element ref="Subtitle" minOccurs="0" maxOccurs="1"/> + <xs:element ref="TOC-Section" minOccurs="0" maxOccurs="1"/> + <xs:choice> + <xs:element ref="Section" minOccurs="0" maxOccurs="unbounded"/> + <xs:element ref="Chapter" minOccurs="0" maxOccurs="unbounded"/> + </xs:choice> + </xs:sequence> + </xs:complexType> + </xs:element> + + <xs:element name="Section"> + <xs:complexType> + <xs:sequence> + <xs:element ref="Title" minOccurs="1" maxOccurs="1"/> + <xs:choice maxOccurs="unbounded"> + <xs:group ref="sectionElements"/> + </xs:choice> + </xs:sequence> + </xs:complexType> + </xs:element> + + <xs:group name="sectionElements"> + <xs:choice> + <xs:element ref="Text"/> + <xs:element ref="List"/> + <xs:element ref="Table"/> + <xs:element ref="Graphic-Block"/> + <xs:element ref="Section"/> + </xs:choice> + </xs:group> + + <xs:element name="Graphic-Block"> + <xs:complexType> + <xs:sequence> + <xs:element ref="Graphic" minOccurs="0" maxOccurs="1"/> + <xs:element ref="Label" minOccurs="0" maxOccurs="1"/> + </xs:sequence> + </xs:complexType> + </xs:element> + + <xs:element name="Label"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:text"> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="Graphic"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:imageType"> + <xs:attribute name="style" type="xs:string"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="Title"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:text"> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="Subtitle"> + <xs:complexType mixed="true"/> + </xs:element> + + <xs:element name="Text"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:text"> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="List"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:list"> + <xs:choice maxOccurs="unbounded"> + <xs:element ref="List-Item" minOccurs="1" maxOccurs="unbounded"/> + </xs:choice> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="List-Item"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:listitemType"> + <xs:choice maxOccurs="unbounded"> + <xs:element ref="Text" /> + <xs:element ref="Graphic"/> + <xs:element ref="List"/> + </xs:choice> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="Table"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:table"> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="Row" substitutionGroup="aras:tablerow"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:tr"/> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="Entry" substitutionGroup="aras:tablecell"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:td"> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="Text" minOccurs="0" maxOccurs="unbounded"/> + <xs:element ref="List"/> + <xs:element ref="Graphic"/> + </xs:choice> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="ItemInfo"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:itemType"> + <xs:choice maxOccurs="unbounded"> + <xs:element ref="Table" minOccurs="0" maxOccurs="1"/> + </xs:choice> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="TOC"> + <xs:complexType> + <xs:sequence> + <xs:element ref="TOC-Item" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + + <xs:element name="TOC-Item"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:text"> + <xs:attribute name="level" type="xs:string"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="TOC-Section"> + <xs:complexType> + <xs:sequence> + <xs:element ref="Title" minOccurs="1" maxOccurs="1"/> + <xs:element ref="TOC" minOccurs="0" maxOccurs="1"/> + </xs:sequence> + </xs:complexType> + </xs:element> + + <xs:element name="Chapter"> + <xs:complexType> + <xs:sequence> + <xs:element ref="Title" minOccurs="1" maxOccurs="1"/> + <xs:choice maxOccurs="unbounded"> + <xs:group ref="sectionElements"/> + <xs:element ref="Chapter"/> + </xs:choice> + </xs:sequence> + </xs:complexType> + </xs:element> + +</xs:schema> + Image Size Example + + + 128 + 186A72800C6544F494D61BA245880615 + body { + counter-reset: sectionNum; /* Counter used for Chapter / Section numbering */ + counter-reset: figNum; /* Counter used for Graphic Label numbering */ + text-align: left; + font-family: "Tahoma", Geneva, sans-serif +} + +.Standard-Doc > .Title { + margin-top: 15px; + font-size: 2em; + text-align: center; + color: blue; +} + +.Standard-Doc .Subtitle { + margin-top: 0px; + font-size: 1.3em; + text-align: center; + color: #0011FF; +} + +.Graphic-Block { + display: block; + margin-top: 8px; + margin-bottom: 8px; +} + +.Graphic-Block img { + display: block; + margin-left: auto; /* Used to center the image */ + margin-right: auto; +} + +.Graphic-Block .Label { + color: green; + font-size: 1em; + text-align: center; +} + +/* Counter for Graphic Labels that are included within a Chapter or Section */ +.Chapter .Graphic-Block .Label::before, .Section .Graphic-Block .Label::before { + counter-increment: figNum; + content: "Figure " counters(sectionNum, ".") "-" counter(figNum) ": "; +} + +/* Counter for Graphic Labels that are NOT included within a Chapter or Section */ +.Graphic-Block .Label::before { + counter-increment: figNum; + content: "Figure " counter(figNum) ": "; +} + +.Section > .Title { + font-size: 1.5em; + font-style: italic; + font-weight: bold; + color: #505050; + padding-top: 10px; + padding-bottom: 10px; + text-align: left; +} + +table { + width: 100%; +} + +/* Sets a single border line for tables */ +.Table, .Entry { + border: 1px solid white; + border-collapse: collapse; +} + +/* Cell styles */ +.Entry { + padding: 2px; + text-align: left; + font-size: 1em; +} + +/* These styles alternate background color for table rows */ +.Row:nth-child(even) { + background-color: #ddd; +} + +.Row:nth-child(odd) { + background-color: #eee; +} + +/* Style for first row of a table */ +.Row:nth-child(1) { + background-color: #ccc; + text-align: center; + font-size: 1.1em; + font-weight: bold; +} + +/* Style for text within the first row of a table */ +.Row:nth-child(1) .Text { + text-align: center !important; +} + +.List, .Standard-Doc .Table { + margin-top: 8px; + margin-bottom: 8px; +} + +/* Styles for tables produced by the ItemInfo Element for all rows except the first */ +.ItemInfo .Row:nth-of-type(-n+2) { + min-height: 20px; + background-color: #DDE7F5; + font-size: 1em; + font-weight: bold; +} + +.ItemInfo .Title { + padding: 2px; + text-align: center; +} + +.ItemInfo .Row:nth-of-type(2) { + font-size: 1em; +} + +/* Style for Chapter and Table of Contents Titles */ +.Chapter > .Title, .TOC-Section > .Title { + font-size: 1.7em; + font-style: italic; + font-weight: bold; + color: #000050; + padding-top: 10px; + padding-bottom: 10px; + text-align: left; +} + +/* Configures the counters used for Chapters and Sections */ +.Chapter { + counter-reset: figNum; /* Counter used for Graphic Label numbering */ +} + +.Chapter, .Section { + counter-increment: sectionNum; +} + +.Chapter > .Title::before, .Section > .Title::before { + content: counters(sectionNum, '.') ' '; +} + +.Chapter .Chapter, .Chapter .Section, .Section .Section { + counter-reset: sectionNum; +} + +/* This work-around is required to reset the counter in sub Sections and Chapters */ +.Chapter .Chapter ~ .Chapter, .Section .Section ~ .Section, .Chapter .Section ~ .Section, .Chapter .Section ~ .Chapter, .Chapter .Chapter ~ .Section { + counter-reset: none; +} + +/* Style rules for Table of Contents */ +.TOC { + margin-top: 5px; +} + +.TOC > .Title { + font-size: 16px; + font-weight: bold; + color: #326787; + margin-bottom: 5px; + padding: 0px; + border-bottom: 2px solid #326787; +} + +/* This rule will embed a temporary string for TOC Item there are no target Elements in the document*/ +.TOC:empty:after { + content: 'Source elements for Table of Contents were not found..'; + opacity: 0.5; +} + +/* Padding/margin applied to each level in the TOC */ +.TOC-Item { + padding: 0 0 0 5px; +} + +/* This rule will separate all first level TOC Items */ +.TOC-Item[level='0'] { + margin-top: 5px; +} + +/* These rules will specify an indent for each level of TOC Items */ +.TOC-Item[level='1'] { + padding-left: 1em; +} + +.TOC-Item[level='2'] { + padding-left: 2em; +} + +.TOC-Item[level='3'] { + padding-left: 3em; +} + +.TOC-Item[level='4'] { + padding-left: 4em; +} + +/* Style for TOC Item Text */ +.TOC-Item span { + font-weight: bold; + color: #000070 !important; + text-decoration: none !important; +} + +.Graphic +{ + width: var(width); +} + + + Size Style Settings + + + E68A678ADE574FAAB8D3781CF8AA8367 + 256 + 186A72800C6544F494D61BA245880615 + @page { + size: 8.5in 11.0in; + margin: 40px 20px 40px 20px; + + @bottom-center { + content: counter(page); /* Places a auto-generated page number at the bottom center of the page*/ + } +} + +/* Configures the Content to display before the TOC Item target text */ +/* In this case, references the auto-generated counter used by the element + referenced by the href value. +*/ +.TOC-Item a::before { + content: target-counters(attr(href), sectionNum, '.', decimal) " "; +} + +/* Configures the Content to display after the TOC Item target text */ +/* In this case, use a dot (.) as a generated character separating + the TOC Item Text from the Page number. In addition, references + the auto-generated page counter used by the element referenced by + the href value. +*/ +.TOC-Item a::after { + content: leader('.') target-counter(attr(href), page, decimal); +} + +/* Styles the anchor element generated for each TOC Item */ +.TOC-Item a { + font-weight: bold; + color: #000070 !important; + text-decoration: none !important; +} + Size PDF Style Settings + + + E68A678ADE574FAAB8D3781CF8AA8367 + 384 + 186A72800C6544F494D61BA245880615 + /* Styles the anchor element generated for each TOC Item */ +.TOC-Item a { + font-weight: bold; + color: #000070 !important; + text-decoration: none !important; +} + Size HTML Style Settings + + + + + tp_ItemInfoContentGenerator + + + 0 + 128 + 186A72800C6544F494D61BA245880615 + ItemInfo + + + + + tp_TOCContentGenerator + + + { + /* SourceElements: Identifies the Container Document Elements + and Text-based elements to use for each Table of Content Item. + The format is as follows: + + Container Element Name: Text Document Element Name + + For example, the following searches for ‘Chapter’ and ‘Section’ Document + Elements and will use the content of the first ‘Title’ Document Element + within each for the TOC text.*/ + "SourceElements": { + "Chapter": "Title", + "Section": "Title" + }, + /* MaxLevel: The maximum depth to use for the Table of Contents. Valid values are equal to or greater than 1 */ + "MaxLevel": 3, + /* TOCItemName: Name of the Document Element to create for each TOC Item generated */ + "TOCItemName": "TOC-Item" +} + 0 + 1024 + 186A72800C6544F494D61BA245880615 + TOC + + + Editor + 0 + Editor Settings + 0 + 256 + 186A72800C6544F494D61BA245880615 + E68A678ADE574FAAB8D3781CF8AA8367 + Copy of + + + Html + 0 + HTML Settings + 0 + 384 + 186A72800C6544F494D61BA245880615 + F7BE2F7CBF0D4C6CBFBD651559FF46F5 + Copy of + + + PDF + 0 + PDF Settings + 0 + 512 + 186A72800C6544F494D61BA245880615 + 6AC34256D43F4993B70FEFEF586184C6 + Copy of + + + http://www.aras.com/TechDocExample + + \ No newline at end of file diff --git a/Import/CustomTechDocs/Import/tp_XmlSchema/Link Example.xml b/Import/CustomTechDocs/Import/tp_XmlSchema/Link Example.xml new file mode 100644 index 0000000..03d9245 --- /dev/null +++ b/Import/CustomTechDocs/Import/tp_XmlSchema/Link Example.xml @@ -0,0 +1,270 @@ + + + tp_Block + <xs:schema xmlns="http://www.aras.com/TechDocExample" targetNamespace="http://www.aras.com/TechDocExample" xmlns:aras="http://aras.com/ArasTechDoc" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + <xs:import namespace="http://www.w3.org/XML/1998/namespace"/> + <xs:import namespace="http://aras.com/ArasTechDoc"/> + + <xs:element name="Standard-Doc"> + <xs:complexType> + <xs:sequence> + <xs:element ref="Title"/> + <xs:element ref="Subtitle" minOccurs="0" maxOccurs="1"/> + <xs:element ref="TOC-Section" minOccurs="0" maxOccurs="1"/> + <xs:choice> + <xs:element ref="Section" minOccurs="0" maxOccurs="unbounded"/> + <xs:element ref="Chapter" minOccurs="0" maxOccurs="unbounded"/> + </xs:choice> + </xs:sequence> + </xs:complexType> + </xs:element> + + <xs:element name="Section"> + <xs:complexType> + <xs:sequence> + <xs:element ref="Title" minOccurs="1" maxOccurs="1"/> + <xs:choice maxOccurs="unbounded"> + <xs:group ref="sectionElements"/> + </xs:choice> + </xs:sequence> + </xs:complexType> + </xs:element> + + <xs:group name="sectionElements"> + <xs:choice> + <xs:element ref="Text"/> + <xs:element ref="List"/> + <xs:element ref="Table"/> + <xs:element ref="Graphic-Block"/> + <xs:element ref="Section"/> + </xs:choice> + </xs:group> + + <xs:element name="Graphic-Block"> + <xs:complexType> + <xs:sequence> + <xs:element ref="Graphic" minOccurs="0" maxOccurs="1"/> + <xs:element ref="Label" minOccurs="0" maxOccurs="1"/> + </xs:sequence> + </xs:complexType> + </xs:element> + + <xs:element name="Label"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:text"> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="Graphic"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:imageType"> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="Title"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:text"> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="Subtitle"> + <xs:complexType mixed="true"/> + </xs:element> + + <xs:element name="Text"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:text"> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="List"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:list"> + <xs:choice maxOccurs="unbounded"> + <xs:element ref="List-Item" minOccurs="1" maxOccurs="unbounded"/> + </xs:choice> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="List-Item"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:listitemType"> + <xs:choice maxOccurs="unbounded"> + <xs:element ref="Text" /> + <xs:element ref="Graphic"/> + <xs:element ref="List"/> + </xs:choice> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="Table"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:table"> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="Row" substitutionGroup="aras:tablerow"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:tr"/> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="Entry" substitutionGroup="aras:tablecell"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:td"> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="Text" minOccurs="0" maxOccurs="unbounded"/> + <xs:element ref="List"/> + <xs:element ref="Graphic"/> + </xs:choice> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="PartLink"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:itemType"> + <xs:choice maxOccurs="unbounded"> + <xs:element ref="Table" minOccurs="0" maxOccurs="1"/> + </xs:choice> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="ItemInfo"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:itemType"> + <xs:choice maxOccurs="unbounded"> + <xs:element ref="Table" minOccurs="0" maxOccurs="1"/> + </xs:choice> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="TOC"> + <xs:complexType> + <xs:sequence> + <xs:element ref="TOC-Item" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + + <xs:element name="TOC-Item"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="aras:text"> + <xs:attribute name="level" type="xs:string"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="TOC-Section"> + <xs:complexType> + <xs:sequence> + <xs:element ref="Title" minOccurs="1" maxOccurs="1"/> + <xs:element ref="TOC" minOccurs="0" maxOccurs="1"/> + </xs:sequence> + </xs:complexType> + </xs:element> + + <xs:element name="Chapter"> + <xs:complexType> + <xs:sequence> + <xs:element ref="Title" minOccurs="1" maxOccurs="1"/> + <xs:choice maxOccurs="unbounded"> + <xs:group ref="sectionElements"/> + <xs:element ref="Chapter"/> + </xs:choice> + </xs:sequence> + </xs:complexType> + </xs:element> + +</xs:schema> + Link Example + + + + + tp_ItemInfoContentGenerator + + + 0 + 128 + 3BFA25B024AA4382A168B44C449F2F48 + ItemInfo + + + + + tp_TOCContentGenerator + + + { + /* SourceElements: Identifies the Container Document Elements + and Text-based elements to use for each Table of Content Item. + The format is as follows: + + Container Element Name: Text Document Element Name + + For example, the following searches for ‘Chapter’ and ‘Section’ Document + Elements and will use the content of the first ‘Title’ Document Element + within each for the TOC text.*/ + "SourceElements": { + "Chapter": "Title", + "Section": "Title" + }, + /* MaxLevel: The maximum depth to use for the Table of Contents. Valid values are equal to or greater than 1 */ + "MaxLevel": 3, + /* TOCItemName: Name of the Document Element to create for each TOC Item generated */ + "TOCItemName": "TOC-Item" +} + 0 + 1024 + 3BFA25B024AA4382A168B44C449F2F48 + TOC + + + + + labs_PartLinkGenerator + + + 1 + 1152 + 3BFA25B024AA4382A168B44C449F2F48 + PartLink + + + http://www.aras.com/TechDocExample + + \ No newline at end of file diff --git a/README.md b/README.md index 3c91552..d5ff142 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,15 @@ Demonstrates how to create a custom content generator for Tech Doc schema elemen ![Customized ItemInfo Element](./Screenshots/catalog-in-editor.png) -The project's import package adds a new content generator method for the ItemInfo schema element, replacing the out-of-the-box implementation. The new content generator method, `labs_ItemInfoContentGenerator`, populates every new ItemInfo element with the name, description, cost, major revision/generation, state, and created date for the selected assembly (Part item). The method also adds the assembly's BOM in a tabular layout. +The project's import package adds a collection of examples showcasing how you can customize the look and functionality of a Tech-Doc. + +The first example includes a new content generator method for the ItemInfo schema element, replacing the out-of-the-box implementation. The new content generator method, `labs_ItemInfoContentGenerator`, populates every new ItemInfo element with the name, description, cost, major revision/generation, state, and created date for the selected assembly (Part item). The method also adds the assembly's BOM in a tabular layout. + +The second example has a new schema which allows you to modify the size of graphics you add to your Tech-Doc. There are two different schemas. One allows you to set predefined widths for your graphics, and one allows you to insert any styling you'd like on your graphic. Both of these changes can be made by editing the attributes for a graphic included in your Tech-Doc. These changes don't require a new content generator, just modifications to the schema and stylesheet. + +The third example allows you to create a table which contains dynamically generated links for each row of the table. The example uses the part ItemType and a single entry, but the code could easily be modified to work for other ItemTypes as well. The content generator method `labs_PartLinkGenerator`, shows how you can modify the attributes of a TextDocumentElement to add an external hyperlink dynamically within a table cell. + +This project also includes the ability to create a template for future Tech-Docs. This is incredibly handy if you need multiple documents which follow a specific format. The instructions on how to use templates can be found below. ## History @@ -14,6 +22,7 @@ This project and the following release notes have been migrated from the old Ara Release | Notes --------|-------- +[V1.3](https://github.com/ArasLabs/custom-tech-docs/releases/tag/v1.3) | Added more examples and updated for SP15 [v1.2](https://github.com/ArasLabs/custom-tech-docs/releases/tag/v1.2) | Adds template functionality. [v1.1](https://github.com/ArasLabs/custom-tech-docs/releases/tag/v1.1) | Fixes an import error. [v1.0](https://github.com/ArasLabs/custom-tech-docs/releases/tag/v1.0) | First release. Though built and tested using Aras 11.0 SP9, this project may function in older releases of Aras 11.0. @@ -22,6 +31,7 @@ Release | Notes Project | Aras --------|------ +[v1.3](https://github.com/ArasLabs/custom-tech-docs/releases/tag/v1.3) | 11.0 SP15 [v1.2](https://github.com/ArasLabs/custom-tech-docs/releases/tag/v1.2) | 11.0 SP9 [v1.1](https://github.com/ArasLabs/custom-tech-docs/releases/tag/v1.1) | 11.0 SP9 [v1.0](https://github.com/ArasLabs/custom-tech-docs/releases/tag/v1.0) | 11.0 SP9 @@ -40,6 +50,7 @@ Project | Aras ### Install Steps +**The Aras Update package for Tech-Docs is not supported in SP15** 1. Backup your database and store the BAK file in a safe place. 2. Open up the Aras Package Import tool. 3. Enter your login credentials and click **Login** @@ -83,6 +94,25 @@ You are now ready to login to Aras and try out the CustomTechDocs project. The new document will open in a new tab. The content will be populated based on the selected template. +### Custom Graphic Sizing +1. Log into Aras as Admin. +2. Navigate to **Technical Doucmentation > Technical Documents**. +3. Create a new Technical Document with `Image Size Example` schema. +4. Add a graphic to the document. +5. Right-click the graphic element, and select **Edit Attributes** +6. Type **Width: 100px** and save the attributes. You can add any CSS Styling to the image here. + + +### Table With Links +**Pre-requisite:** The Aras instance shoudl include multiple Parts. +1. Log into Aras as Admin. +2. Navigate to **Technical Doucmentation > Technical Documents**. +3. Create a new Technical Document with `linkExample` schema. +4. Add a `PartLink` item to the document. +5. Select a part to reference within the table. +6. Highlight the cell with the hyperlink +7. Press the `Test Link` buton which appears in the toolbar. + ## Contributing 1. Fork it! From bf1d15b2dacdc1b917c77d9ec2937f6e0b1beb5a Mon Sep 17 00:00:00 2001 From: AJ Sebastian Date: Mon, 11 Feb 2019 15:48:41 -0500 Subject: [PATCH 2/2] Updated readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d5ff142..85a76a1 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ The project's import package adds a collection of examples showcasing how you ca The first example includes a new content generator method for the ItemInfo schema element, replacing the out-of-the-box implementation. The new content generator method, `labs_ItemInfoContentGenerator`, populates every new ItemInfo element with the name, description, cost, major revision/generation, state, and created date for the selected assembly (Part item). The method also adds the assembly's BOM in a tabular layout. -The second example has a new schema which allows you to modify the size of graphics you add to your Tech-Doc. There are two different schemas. One allows you to set predefined widths for your graphics, and one allows you to insert any styling you'd like on your graphic. Both of these changes can be made by editing the attributes for a graphic included in your Tech-Doc. These changes don't require a new content generator, just modifications to the schema and stylesheet. +The second example includes a new schema, which allows you to modify the size of graphics within your Tech-Doc. The example allows you to set the width of a graphic by editing an attribute, however this could be extended to apply any styling to a graphic. These changes don't require a new content generator, just modifications to the schema and stylesheet. -The third example allows you to create a table which contains dynamically generated links for each row of the table. The example uses the part ItemType and a single entry, but the code could easily be modified to work for other ItemTypes as well. The content generator method `labs_PartLinkGenerator`, shows how you can modify the attributes of a TextDocumentElement to add an external hyperlink dynamically within a table cell. +The third example allows you to create a table which contains dynamically generated links for each row of the table. It includes a new document type, called `Link Example` The example uses the part ItemType and a single entry, but the code could easily be modified to work for other ItemTypes as well. The content generator method `labs_PartLinkGenerator`, shows how you can modify the attributes of a TextDocumentElement to add an external hyperlink dynamically within a table cell. This project also includes the ability to create a template for future Tech-Docs. This is incredibly handy if you need multiple documents which follow a specific format. The instructions on how to use templates can be found below. @@ -107,7 +107,7 @@ The new document will open in a new tab. The content will be populated based on **Pre-requisite:** The Aras instance shoudl include multiple Parts. 1. Log into Aras as Admin. 2. Navigate to **Technical Doucmentation > Technical Documents**. -3. Create a new Technical Document with `linkExample` schema. +3. Create a new Technical Document with `Link Example` schema. 4. Add a `PartLink` item to the document. 5. Select a part to reference within the table. 6. Highlight the cell with the hyperlink