1、 2003 EDS Customization I WorkshopsiContentsWorkshop 1: Understanding the Systems Configuration 1Task 1: Use the muxstat utility to investigate the MUX process. .2Task 2: Use the dspstat utility to investigate the dispatcher process.3Task 3: Find the value of the environment variables4Task 4: Use th
2、e cfgtest utility to find settings for the production system5Task 5: Use the mtiwhich utility to find the locations of files. .6Task 6: Start the online documentation and look up the mktstenv utility. 7Workshop 2A: Creating a Test Environment9Task 1: Create a test environment.10Task 2: Use the cfgte
3、st utility to find settings for the test environment. .12Task 3: Change the background color of the test environment13Workshop 2B: Creating a Customization Directory 15Task 1: Use the mkcusdir utility to create a customization directory16Task 2: Use the mtiwhich utility to find the locations of the
4、following files. 17Task 3: Build a new server and object dictionary.18Task 4: Create a file system and work location19Workshop 3A: Defining Classes23Task 1: Copy the source file.24Task 2: Modify files. .25Task 3: Create new makefiles26Task 4: Run nmake metas. 27Task 5: Create a new object dictionary
5、28Task 6: Update the database.29Task 7: Verify that the new classes are defined.30Workshop 3B: Loading Data into the Database.31Task 1: Load an instance of the Xfig Tool class.32Task 2: Query for tools.33Workshop 4A: Defining Menu Options .35Task 1: Define new menu options36Task 2: Modify the new me
6、nu options38Workshop 4B: Defining Icons and Popup Menus41Task 1: Define new icon bitmap files and new popup menus. .42Task 2: Change the default view of a browser.44Workshop 5: Defining Attributes.45Task 1: Define a new attribute. 46Workshop 6: Defining and Editing Dialog Windows .49Task 1: Include
7、the X2DwgDim attribute on several dialog classes.50Customization I Workshops 2003 EDSiiTask 2: Edit the dialog window format. 51Task 3: Advanced Pre-filled attribute values and expansion dialogs52Workshop 7: Defining Help Text55Task 1: Define help text for Drawing and Xfig Sketch56Task 2: Add free-f
8、orm text to the Create Drawing dialog.57Workshop 8: Defining Variable Value Sets.59Task 1: Create a new attribute.60Task 2: Create a persistent class and an attribute.61Task 3: Define a Draw Type Name Option on the browser62Task 4: Define dialogs for the X2DType objects63Task 5: Define a new variabl
9、e value set. .64Summary Workshop.65Task 1: Create a new test environment and customization directory.66Task 2: Define the object class and attributes. 68Task 3: Define menu options and browsers.69Task 4: Define dialog classes. .70Task 5: Edit the layout of forms using the Dialog Window Editor.71Task
10、 6: Define a new message and method72Task 7: Define a variable value set74Task 8: Define a relation. .75Workshop 9: ERO Relations 77Task 1: Create an extended relation object. 78Workshop 10: Class Clustering.85Task 1: Preparation86Task 2: Clustering. .87Task 3: Migration and Cleanup. .88Appendix A:
11、Workshop Template Files 89ws3.met90x2madmdb.dat91ws4.met.92ws4a_b.met 93ws4b_b.met 96ws5.met.102ws6.met.104ws7.met.106ero.met108erob.met109 2003 EDS Customization I Workshops1Workshop 1: Understanding the Systems ConfigurationIntroductionIn this workshop, you use various utilities to become familiar
12、 with the configuration of an in-production Teamcenter Enterprise system.Task Checklist Use the muxstat utility. Use the dspstat utility. Find environment variable values. Use the cfgtest utility. Use the mtiwhich utility. Use the online help.Customization I Workshops 2003 EDS2Task 1: Use the muxsta
13、t utility to investigate the MUX process.WhatIn this task, you use the muxstat utility to access information about the MUX process. The MUX controls communication for the Teamcenter Enterprise system.WhyVerifying that the MUX is running is an important step in troubleshooting.How1) Log in to the ope
14、rating system.2) Open a command prompt and enter the following:a) cd MTI_ROOTconfig (Refer to the handout for the value of MTI_ROOT.)b) pdmsetupc) muxstat -H (print the muxstat usage text)d) muxstat -v (print verbose output)Validation:1) What IP port is being used by the MUX?75002) How many messages
15、 has the MUX handled?508669 2003 EDS Customization I Workshops3Task 2: Use the dspstat utility to investigate the dispatcher process.WhatIn this task, you use the dspstat utility to access information about the dispatcher.WhyVerifying that the dispatcher is running is an important step in troublesho
16、oting. The dispatcher manages the Teamcenter Enterprise server pool.HowAt the command prompt enter:dspstat H (print the dspstat usage text)dspstat -s omfsvr (print information about the omf server)dspstat -s mloader (print information about the model loader)dspstat -s mserv (print information about
17、the model server)dspstat -s scheduleserv (print information about the schedule server)dspstat -s OS_SERV (print information about the OS server)Customization I Workshops 2003 EDS4Task 3: Find the value of the environment variables.WhatIn this task, you find the value of two environment variables, MT
18、I_ROOT and PDM_CONFIG.WhyThe value of MTI_ROOT will tell you in what directory Teamcenter Enterprise is running. The value of PDM_CONFIG will give the path to the config.cfg file.HowAt the command prompt enter:set MTI_ROOTset PDM_CONFIGValidation:1) What is the value of the environment variable MTI_
19、ROOT?D:TC20052) What is the full path of the Teamcenter Enterprise configuration, PDM_CONFIG?PDM_CONFIG=D:TC2005configconfig.cfg 2003 EDS Customization I Workshops5Task 4: Use the cfgtest utility to find settings for the production system.WhatIn this task, you run the cfgtest utility. This utility r
20、eads and interprets the configuration file and the environment variables for the Teamcenter Enterprise environment.WhyThe cfgtest utility is a useful way to gather information about the Teamcenter Enterprise environment.HowAt the command prompt enter:cfgtest -A config.txtnotepad config.txtValidation
21、:Looking at the file, answer the following questions:a) What is the value for the database name (DDB)?pdmm50ab) What is the service name of the database server?c) What is the file name of the database server executable?d) What is the value for VC_MUX_IPPORT?e) What is the value for the database pass
22、word file (PWF)?f) What is the value for the rules cache directory (RULEFILE)?g) What is the operating system username for the trusted user on your host machine (pdmuser)?h) What is the RGB-value of the browser background color (BROWSER_WINDOW_BG)? Customization I Workshops 2003 EDS6Task 5: Use the
23、mtiwhich utility to find the locations of files.WhatIn this task, you use the mtiwhich utility to locate three important files, tmti.prd, mti.prd, and dbtop.prd. The mtiwhich utility is used to find which file is being used by the Teamcenter Enterprise system and where the file is located.WhyThe thr
24、ee files you are locating are essential to the Teamcenter Enterprise system. The dbtop.prd file defines the database topology and database mapping. The mti.prd file contains information used to build the object dictionary. The tmti.prd file is the object dictionary. Teamcenter Enterprise uses it at
25、runtime.How1) Set the MTIPATH environment variable:a) Right-click on the My Computer icon on your desktop and select Properties.b) In the System Properties dialog click the Advanced tab.c) Click the Environment Variables button.d) Set MTIPATH to:MTI_ROOT MTI_ROOTmeta MTI_ROOTmeta- MTI_ROOTconfigSee
26、the handout for value of MTI_ROOT.)2) At the command prompt enter:mtiwhich tmti.prdmtiwhich mti.prdmtiwhich dbtop.prdValidation:What is the location of tmti.prd?What is the location of mti.prd?What is the location of dbtop.prd? 2003 EDS Customization I Workshops7Task 6: Start the online documentatio
27、n and look up the mktstenv utility.WhatIn this task, you use the online documentation to get information about the mktstenv utility.WhyThe online documentation is a useful tool for accessing information when youre customizing Teamcenter Enterprise.HowOpen Netscape or Internet Explorer.Go to the book
28、mark for Teamcenter Enterprise documentation.Click on the magnifying glass.In the Enter keywords field, enter:mktstenvClick Find.Validation:What does mktstenv do?End of Workshop 1Customization I Workshops 2003 EDS8Workshop 2A: Creating a Test EnvironmentIntroductionIn this workshop, you use the comm
29、and-line utilities to create and examine a test environment.Task Checklist Create a test environment. Use the cfgtest utility. Change the background color of the test environment. 2003 EDS Customization I Workshops9Create a test environment.WhatIn this task, you will create a test environment and da
30、tabase. You will use the test environment to build your customizations. The remaining workshops in this course, with the exception of the Summary Workshop, will use this test environment.WhyCreating a test environment allows you to build and test your customizations without affecting the in-producti
31、on environment.How1) Open a command prompt and enter the following:cd MTI_ROOTconfig (See the handout for value of MTI_ROOT.)pdmsetupcd HOME (See the handout for value of HOME.)mktstenv2) Respond to the prompts using the table below:Attribute ValueTest Environment Directory x2mtestDatabase Vendor OR
32、ATest Database Name x2mdbIs this an existing database? NModules to excludeInclude only OMF, ISC, LCM, OCC, and TMS. Exclude all other modules by entering their name separated by spaces.Oracle System user password managerExisting Tablespace Name Click the Enter key.Size of Oracle tablespace megs 50Fu
33、ll path of Oracle data file Click the Enter key to take the default.Test IPPORT number 7360Validation:Verify that the new test environment will start by entering the following:cd x2mtestpdmsetupomfCustomization I Workshops 2003 EDS103) From the Home Collection browser, select Help - Session Informat
34、ion.Is the x2mdb database being used?4) Log out of OMF. 2003 EDS Customization I Workshops11Task 7: Use the cfgtest utility to find settings for the test environment.WhatIn this task, you use the cfgtest utility to get information on the test environment.WhyThis will verify that the test environment
35、 was properly created.HowFrom the command prompt enter the following:Tip: If you open a new command prompt, you must go to the x2mtest directory and run pdmsetup before running cfgtest.a) cfgtest -A config.txtb) notepad config.txtValidation5) Looking at the file, answer the following questions:What
36、is the value for the database name (DDB)?What is the service name of the database server?What is the file name of the database server executable?What is the value for VC_MUX_IPPORT?What is the value for the database password file (PWF)?What is the value for the rules cache directory (RULEFILE)?What
37、is the trusted user operating system name on your host machine (pdmuser)?Customization I Workshops 2003 EDS12Task 8: Change the background color of the test environment.WhatIn this task, you change the browser window background color used by the test environment.WhyThis will help you to easily disti
38、nguish between the test environment and the in-production environment when running Teamcenter Enterprise. How1) From the command prompt, cd to x2mtest.2) From the command prompt, enter:notepad config.cfg3) Modify the RGB (Red-Green-Blue) values of the browser background color by:locating the followi
39、ng line:set BROWSER_WINDOW_BG “196 216 242”;modifying the line as follows:set BROWSER_WINDOW_BG “255 225 200”;4) Log out of OMF.Validation:Log in to OMF.Look for the new background color.Log out of OMF.End of Workshop 2A 2003 EDS Customization I Workshops13Customization I Workshops 2003 EDS14Worksho
40、p 2B: Creating a Customization DirectoryIntroductionIn this workshop, you create a customization directory. The customization directory is a place to develop MODeL code, method code, and perform other customization activities without impacting the production environment.Task Checklist Create a custo
41、mization directory. Run mtiwhich. Build a new server and object dictionary. Create a file system and work location. 2003 EDS Customization I Workshops15Use the mkcusdir utility to create a customization directory.WhatIn this task, you create a customization directory. This creates the directory stru
42、cture used for building your custom server.WhyHaving a custom server allows you to build and test your customizations without affecting the in-production environment.HowFrom the command prompt, in the HOME directory, run mkcusdir.Tip: If you open a new command prompt, you must go to the x2mtest dire
43、ctory and run pdmsetup before running mkcusdir.5) Respond to the prompts as follows:Attribute ValueCustomization Directory x2mdirThree-character server name x2mFull server name X2m CustomizationCustomization I Workshops 2003 EDS16Task 9: Use the mtiwhich utility to find the locations of the followin
44、g files.WhatIn this task, you locate the files used by Teamcenter Enterprise to define the object dictionary, tmti.prd and mti.prd.WhyThis will verify that the customization directory structure was properly created.HowAt the command prompt enter:cd x2mdircussetupmtiwhich tmti.prdmtiwhich mti.prdNote
45、: If you open a new command window, you need to do two things to point the command window at the test environment and the customization directory:1) In the x2mtest directory run pdmsetup. This will source the test environment.2) In the x2mdir directory run cussetup. This will source the customizatio
46、n directory.Validation:What is the location of tmti.prd?What is the location of mti.prd? 2003 EDS Customization I Workshops17Task 10: Build a new server and object dictionary.WhatIn this task, you build a new customization server and object dictionary.WhyThe nmake metas command builds the object dic
47、tionary. The nmake all command builds the server executable.HowAt the command prompt enter:cd x2mdirnmake metasnmake allCustomization I Workshops 2003 EDS18Task 11: Create a file system and work location.WhatIn this task, you create a file system item and a work location. You will use the work locat
48、ion to store data items created in workshops to follow.WhyData items consist of both data - the file on the operating system - and metadata. The file associated with the data item must be kept in either a work location or a vault location. Both work locations and vault locations must be in a Teamcenter Enterprise file system.HowAt the command prompt enter:dspstopmuxstopnetstartomf3) Log in to OMF.4) Create a file system:a) Select File Change Host and Directory. 2003 EDS Customization I Workshops19b) Copy the path in the Current