cancel
Showing results for 
Search instead for 
Did you mean: 

Create Custom Tab on Item Revision Summary Stylesheet

Genius
Genius

Folks !

 

Could any provide me a little insight on how to build a custom tab / page using the summary style sheet for Item Revision ?

 

 

 

 

Teamcenter 10.1.3
TC Visualization 10.1.3 (Custom Patch)
NX:8.5 | NX 9.02 | Catia V5 R2012 | AutoCAD 2015 | In-Context Editor |
8 REPLIES

Re: Create Custom Tab on Item Revision Summary Stylesheet

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

You can pages and sections to the Item xml (see attached).

Item.PNG


Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11.0.1.mp01 | SW 2016 | TcUA 11.2.3
Evaluating:AW 3.2

Re: Create Custom Tab on Item Revision Summary Stylesheet

Genius
Genius

Randy,

 

Thanks for the swift response. How can i create a new tc_xrt_custompage.xml ?

 

Any pointers will help.

 

Cheers!

Teamcenter 10.1.3
TC Visualization 10.1.3 (Custom Patch)
NX:8.5 | NX 9.02 | Catia V5 R2012 | AutoCAD 2015 | In-Context Editor |

Re: Create Custom Tab on Item Revision Summary Stylesheet

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

I think you may be confused. You don't need to create another xml file but modify the existing ItemSummary (called Item.xml) and ItemCreate (called ItemCreate.xml) stylesheets that already exist in TC. You add the "page" and "section" code to the existing stylesheets.

 

Which stylesheet used is controlled by preferences:

  • Item.RENDERING
  • Item.SUMMARYRENDERING
  • Item.CREATERENDERING
  • ItemCreate.CREATE_REGISTEREDTO
  • Item.SAVEASRENDERING
  • ItemSaveAs.SAVEAS_REGISTEREDTO
  • ItemRevision.RENDERING
  • ItemRevision.REGISTEREDTO
  • ItemRevision.SUMMARYRENDERING
  • ItemRevision.SAVEASRENDERING
  • ItemRevSaveAs.SAVEAS_REGISTEREDTO

The datasets are stored in folders "SystemStyleSheets" and "StyleSheets". You can modify them directly or export/edit/import using (Document in this case):

:: DocumentCreate
@echo.
@echo.Importing stylesheet datasets for DocumentCreate
@echo.
import_file -u=infodba -p=%TCPASSWD% -g=dba -de=r -f=DocumentCreate.xml  -d=DocumentCreate  -ref=XMLRendering -type=XMLRenderingStylesheet -
@echo.
@echo.Creating stylesheet preferences for DocumentCreate
@echo.
preferences_manager -u=infodba -p=%TCPASSWD% -g=dba -mode=import -scope=SITE -file=_document_prefs.xml -action=OVERRIDE

Remember to regen the meta cache after modifying stylesheets and genregxml after modifying prefs.

 


Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11.0.1.mp01 | SW 2016 | TcUA 11.2.3
Evaluating:AW 3.2

Re: Create Custom Tab on Item Revision Summary Stylesheet

Genius
Genius

Randy,

 

I have copied the existing Stylesheet and Assigned to the custom Item already by adding the custom attributes. I need to only add the tabs. here is the code is am using in the registered stylesheet to display the tab. Am not sure what is the problem. When this code is added to the summary tab is blank. Looks like something wrong with the syntax. Could you please help ?

 

Here is the code: I am trying to add.

 

<page titleKey="Reports">

<section title="Reports">

  <objectSet source="JLF4Reports.WorkspaceObject" defaultdisplay="thumbnailDisplay" sortby="object_name" sortdirection="ascending">

     <tableDisplay>

         <property name="object_string"/>

         <property name="object_desc"/>

         <property name="object_type"/>

         <property name="owning_user"/>

         <property name="owning_group"/>

         <property name="last_mod_user"/>

     </tableDisplay>

        <thumbnailDisplay/>

        <treeDisplay>

          <property name="object_string"/>

          <property name="object_desc"/>

          <property name="object_type"/>

          <property name="owning_user"/>

          <property name="owning_group"/>

          <property name="last_mod_user"/>

        </treeDisplay>

          <listDisplay/>

           <command actionKey="newBusinessObjectContextualAction" commandId="com.teamcenter.rac.common.AddNew" renderingHint="commandbutton"/>

            <command actionKey="cutAction" commandId="org.eclipse.ui.edit.cut" renderingHint="commandbutton">

               <parameter name="localSelection" value="true"/>

            </command>

            <command actionKey="copyAction" commandId="com.teamcenter.rac.copy" renderingHint="commandbutton"/>

            <command actionKey="pasteAction" commandId="com.teamcenter.rac.viewer.pastewithContext" renderingHint="commandbutton"/>

  </objectSet>

</section>

</page>

 

 

 

 

 

Teamcenter 10.1.3
TC Visualization 10.1.3 (Custom Patch)
NX:8.5 | NX 9.02 | Catia V5 R2012 | AutoCAD 2015 | In-Context Editor |

Re: Create Custom Tab on Item Revision Summary Stylesheet

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

It looks to me like you're missing a bunch of arguments to your attributes. But it also looks extremely close to the docs (Client Customization Programmers Guide, Enterprise Wide Configuration, Sample Customizations Using Style Sheets). I don't play around with ObjectSet so someone else can answer if it is correct or not.

 

Here's what is in the guide:

Section.png

 

This web site shows how to modify the stylesheet successfully and ensure the cache is clean:

http://www.plmconsult.nl/blog/203-the-use-of-style-sheets-in-teamcenter

 

The OOTB Item stylesheet shows more attributes than the sample does:

OOTBItem.png


Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11.0.1.mp01 | SW 2016 | TcUA 11.2.3
Evaluating:AW 3.2

Re: Create Custom Tab on Item Revision Summary Stylesheet

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

The CM-ItemSummary.xml and CM-ItemRevSummary.xml stylesheets give good examples for what you're trying to do. Give them a gander. I had to zip the xml files in order to post them.


Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11.0.1.mp01 | SW 2016 | TcUA 11.2.3
Evaluating:AW 3.2

Re: Create Custom Tab on Item Revision Summary Stylesheet

Solution Partner Experimenter Solution Partner Experimenter
Solution Partner Experimenter
I have side question to this problem. What do I need to do to define localized name for tab (or page) element. OOTB stylesheet uses values defined in xml files in TC_ROOT/lang folder. Do I need to create similar file in TC_ROOT/lang with custom localized names and use them? Or I can somehow define localization in BMIDE?

Re: Create Custom Tab on Item Revision Summary Stylesheet

Genius
Genius

I was able to create a custom tab as required and also list the contents of Psuedo Folder linked Item Revision by using the following code.

 

 </page>
    <page title="NAME OF THE TAB">
  <objectSet source="RELATION NAME.WorkspaceObject" defaultdisplay="thumbnailDisplay" sortby="object_name" sortdirection="ascending">
            <tableDisplay>
                <property name="object_string"/>
                <property name="release_status_list"/>
                <property name="relation"/>
                <property name="last_mod_date"/>
                <property name="last_mod_user"/>
                <property name="checked_out_user"/>
            </tableDisplay>
            <thumbnailDisplay/>
            <treeDisplay>
                <property name="object_string"/>
                <property name="release_status_list"/>
                <property name="relation"/>
                <property name="last_mod_date"/>
                <property name="last_mod_user"/>
                <property name="checked_out_user"/>
            </treeDisplay>
            <listDisplay/>
            <command actionKey="newBusinessObjectContextualAction" commandId="com.teamcenter.rac.common.AddNew" renderingHint="commandbutton"/>
            <command actionKey="pasteAction" commandId="com.teamcenter.rac.viewer.pastewithContext" renderingHint="commandbutton"/>
            <command actionKey="cutAction" commandId="org.eclipse.ui.edit.cut" renderingHint="commandbutton">
                    <parameter name="localSelection" value="true"/>
            </command>
       </objectSet>

 

Thought, I would share the code here, just in case if anybody else in the forum require it.

Cheers !

Teamcenter 10.1.3
TC Visualization 10.1.3 (Custom Patch)
NX:8.5 | NX 9.02 | Catia V5 R2012 | AutoCAD 2015 | In-Context Editor |