Cancel
Showing results for 
Search instead for 
Did you mean: 

Importing all the stylesheets form one server to another

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Hello,

 

I have 2 TC installations and I want to import all the stylesheets from the first one to the second one.

Some stylesheets are already existing so I would like an overrite and others aren't.

 

I wanted to use the  the import_file command, is it the best for this case ?

 

Thank you in advance.

 

Sènan

13 REPLIES

Re: Importing all the stylesheets form one server to another

Legend
Legend

hello,

 

One of the best ways to manage stylesheets is using install_xml_stylesheet_datasets

You need to create datafile with all the stylesheet datasets names and actual xml file names. Place all xml files in one folder which is accesible and set the the datafile and xml folder path as input arguments to the utility as below

 

install_xml_stylesheet_datasets -h

Usage is: install_xml_stylesheet_datasets
        -u=<username> {-p=<psw>|-pf=<psw file>} -g=<group>
            [-h | -input=<dataFile> -filepath=<path for xml files>]
Where:
 -h  Displays detailed help information

 -input=<data_file> Dataset data file
 -filepath=<filepath> The path where the xml files are located
 -replace  For existing Datasets, replace named reference with the new file

 NOTE: Each line in the data file should consist of dataset name and a xml file name separated by ","
       For example, to create a dataset named "myds" with a xml file "abc.xml"
       The input line should be as follows:
       myds, abc.xml

 

This imports all the datasets also overwrites datasets with the same name.

Once the datasets are imported, you can use preferences_manager to export and import all stylesheet related preferences.

As stylesheet registration creates two preferences  for each registration, you need to have both the preferences in your plmxml file.

 

Regards

Mahendra

Re: Importing all the stylesheets form one server to another

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Hi Mahendra,

 

It is exactly what I needed !

Thank you.

 

Sènan

Re: Importing all the stylesheets form one server to another

Siemens Experimenter Siemens Experimenter
Siemens Experimenter
If you're using at least Teamcenter 11.4, you may also consider using the Administration Data functionality. This collects, exports, and packages all administration data from a Teamcenter environment to be used not only as a report, but also can be used to import that data into another Teamcenter environment.

This can manage everything that the BMIDE doesn't: style sheets, preferences, workflows, and so on. Between a BMIDE package and an Admin Data package, you have everything (except the data) needed to reproduce a Production environment into a Test environment, for example.

The contents of these reports are zipped XML, so they can be edited outside of Teamcenter if desired.

Following is the link to the Teamcenter 11.4 documentation for this functionality. It is available from Teamcenter 11.4 onward.
http://docsstage.plm.automation.siemens.com/tdoc/tc/11.4/help#uid:xid1256816:index_managing_admin_da...

Re: Importing all the stylesheets form one server to another

Valued Contributor
Valued Contributor
We use SVN to manage the Preferences, Stylesheets and the utilities. With this you are in control what to deploy from 1 system to another system

Re: Importing all the stylesheets form one server to another

Creator
Creator

Word of caution: I have tried using 'admin data import' utility, it has more baggage.  It just doesn't copy stylesheets but preferences and organization alongwith it. In case, if the organization (volumes, groups, etc.) is different in source and destination servers then this utility messes up the things.

 

Also admin data import utility run second time with correct mergeOption results in duplicate datasets for XML rendering stylesheets. There is an open PR and Siemens working on this.  

 

In nutshell, though it promises to be a powerful utility it is not recommended in Tc11.5/Tc11.4

Re: Importing all the stylesheets form one server to another

Gears Phenom Gears Phenom
Gears Phenom

@DXC_Jo - whom exactly doesn’t recommend it?

Re: Importing all the stylesheets form one server to another

Creator
Creator

My opinion. :)

Re: Importing all the stylesheets form one server to another

Gears Phenom Gears Phenom
Gears Phenom

Ok, I wasn’t sure if someone at Siemens was saying this or not.

 

I actually like it. But agree they need to allow us to detach the Organization if wanted.  But it is very useful to compare changes or even different environments. Also, they could add the directions for post-processing the volumes. I had to figure that out the hard way myself. It’s not perfect but it’s pretty handy, in my opinion. 

 

Jamie

Re: Importing all the stylesheets form one server to another

Creator
Creator

Same here. I burnt my fingers once. This observation is learnt hard way.