Chapter 4 - CATIA Code Server Installation

On This Page

Overview Overview
Preparing for Code Server Installation Preparing for Code Server Installation
Methodologies Methodologies
Installation Validation Installation Validation
Summary Summary

Overview

In this architecture, CATIA V5 is installed on servers and is executed from workstations across the network. Such an arrangement frequently reduces the administrative overhead required to run the system, particularly during installation and later upgrades. It is also similar to a UNIX-based CATIA system, which may suit those migrating to Microsoft Windows. However, you are likely to see a higher level of network traffic with a code server installation than a comparable locally installed system would generate. For a full description of the advantages of this approach and a comparison with local installation, see Chapter 2, "Planning a CATIA UNIX to Windows Migration."

The scalability and efficiency of a code server installation can be improved by using two features of Windows 2000:

  • Offline Folders allow clients to create a local cache of a shared folder from a file server, they can reduce network traffic, and they can create a marked improvement in speed of execution.

  • The Distributed File System (Dfs) can be used to share the load between multiple CATIA code servers.

There are several techniques involved in setting up this architecture. In this chapter the first section, Preparing for Code Server Installation, describes the architecture in detail and compares the setup techniques. You will find step-by-step example procedures for the tools you have selected in the "Methodologies" section.

Preparing for Code Server Installation

If you have chosen this model, the main installation of CATIA is done only on the code server or servers. When clients run the package, code is executed from the server.

General Architecture

Figure 4.1: General Architecture for Code Serving

Figure 4.1: General Architecture for Code Serving

Figure 4.1 illustrates that only a small amount of configuration is required on the client computers. The majority of the setup steps are run on the servers and, because there are fewer servers than desktop computers, the time and effort involved in this setup is often smaller.

A code server installation of CATIA V5 involves these general steps:

  • A setup of CATIA V5 on the code servers. This process is very similar to a local installation.

  • A runtime environment creation in which environment variables are set. This can be done on either client or server.

  • A light setup on the client, including fonts, shortcuts, and the update of configuration files.

    Figure 4.2: Code Server Installation of CATIA

    Figure 4.2: Code Server Installation of CATIA

Optionally, Offline Folders and Dfs may be set up after the main installation for greater performance and efficiency.

Server-side Installation

The installation of CATIA on the code server is identical to that on desktop computers when performing a local installation. For a step-by-step run-through of this procedure, see the "Methodologies" section of Chapter 3, "CATIA Local Installation."

Having completed the installation, it will be helpful to your users to share the documentation directory on the server so that they can easily access help. This documentation can be accessed with a browser.

Runtime Environment Creation

The runtime environment of any application consists of environment variables used to store properties. CATIA uses around 40 of these and provides a command to automatically create them: setcatenv.exe. This generates an environment file that is stored on the code server and is used to create the environment when the application is run.

Runtime environments could be created either on clients or on servers. Typically, global environments are stored on servers and user environments are stored locally.

To create the runtime environment, your user account must have read and write permissions on the share where CATIA is installed. Users, however, should have only read access to this share so that they can run programs, but not be able to delete files or change the environment. The environment file can be stored either in the same directory as the CATIA V5 code itself or in a sub-directory.

The runtime environment creation process involves the following actions:

  • Access the share where the environment will be stored. This must use the same path users will access to run CATIA V5. It can be either via a UNC name, such as \\SERVER1\CATIA, or a mapped drive letter.

  • Create the directory where the runtime environment file will be stored.

  • Execute the setcatenv command.

The setcatenv command also creates shortcuts on the servers desktop and Programs menu. These appear in the All Users profile. For users to be able to access CATIA easily, these shortcuts must be copied to the same location on client computers.

Client-side Installation

In a code server installation, the setup steps required on the client are comparatively few. However, the following components are required on all client computers:

  • The C++ Runtime library

  • Shortcuts to run CATIA V5

In addition, some other components may be needed, depending on the functionality a user needs:

  • VBA 6. Microsoft Visual Basic for Applications 6.0 is used to replay or record macros. Macros allow a complex procedure to be recorded so that it can later be repeated by selecting it from a list.

  • Fonts. CATIA V5 includes extended fonts.

  • Tools. Environment Editor, Nodelock Key Management, Settings Management, and Software Management are CATIA administrative tools. These tools are required only on computers that will be used to administer the system.

  • OLE records. Object linking and embedding (OLE) support allows a user to open documents by a double-clicking on them.

  • etc\services file. This file includes the configuration necessary to exchange information between CATIA V5 and other services, such as DMU, a Dassault Systemes service. If you wish to use process interoperability, you must make additions to this file.

Client-side MSI Package Creation

Chapter 3 explains that local installation on clients is a long process that could be automated using package and deployment tools. When you are using code server architecture, the client-side setup is much quicker. However, if you have hundreds of clients or more, a similar packaging approach can save you valuable administrative effort.

The same techniques used to package and deploy a complete local installation of CATIA can also be used to roll out the client-side components of a code server installation. For example, having set them up on a master client, you could create a Symantec Ghost image and deploy it with the Ghost Console.

In this chapter, the use of MSI files for packaging and deployment is discussed and the AdminStudio tool from InstallShield examined. Figure 4.3 provides an overview of this process. Bear in mind, however, that the other solutions described in Chapter 3 can be used instead.

Figure 4.3: Client side deployment of CATIA

Figure 4.3: Client side deployment of CATIA

An MSI package can be created to install both required and optional components. The Methodologies section later in the chapter provides example procedures for each of these components.

Deployment of MSI Packages

A full discussion of options for deploying MSI packages can be found in Chapter 3, "CATIA Local Installation." To recap:

Deploying an application from a central point can be done either with Active Directory Group Policies, Microsoft Systems Management Server (SMS), or Symantec Ghost Console.

Active Directory Group Policies permit:

  • Deployment of MSI packages from a central point.

  • Highly flexible per-user, per-group, or per-computer assignment.

  • Installation of packages under local system account.

  • Un-installation from a central point.

SMS adds the following management functions:

  • Planning. Systems Management Server permits administrators to meter application usage. The planning tools in SMS also help administrators conduct audits and compliance checks, monitor and restrict application use, and plan operations such as deployments and upgrades.

  • Deployment. Using SMS, an IT administrator can distribute and install software in the background on a Windows 2000-based network, irrespective of whether the users are logged on or not.

  • Diagnosis. Systems Management Server provides a range of advanced remote diagnostic tools to help administrators manage desktops and servers without having to conduct on-site visits. These include tools such as remote control and remote reboot, a network monitor with real time and post-capture experts to analyze network conditions and performance, and a tool that can track critical performance information on the Microsoft Windows NT Server operating system and the Microsoft BackOffice family.

The Symantec Ghost suite of applications is principally designed for the creation and deployment of Ghost images and AutoInstall (AI) packages. If you have selected these package types, Ghost Console is the natural choice for deployment. Although Ghost Console can be used to deploy MSI packages, it is unlikely that you would choose it for this feature alone because Group Policy, a standard feature of Windows 2000 Server, is sufficient.

For step-by-step procedures showing the use of these tools for deployment, see Chapter 3, "CATIA Local Installation."

Multiple Releases of CATIA V5 on the Same Workstation

When a service pack or a hotfix for CATIA V5 becomes available, it is advisable to run tests for a period before rolling the new version out to all users. To achieve this, you may have dedicated client computers. However, due to constraints such as budget, desktop space, and time, it is more likely that testing will have to be done on the production client computers. Thus, during the testing phase the pilot and production versions of CATIA are run on the same workstation.

Generally, there will be two or three releases of CATIA V5 available for dedicated users groups who perform testing.

Fortunately, in a code server installation only the following components are stored on workstations:

  • Shortcuts to CATIA V5 launcher program

  • C++ Runtime

  • Etc\Service file configuration (optional)

  • CATIA V5 specific fonts (optional)

  • OLE records (optional)

  • VBA runtime (optional)

Given that all these components are compatible between CATIA V5 releases, multiple releases of CATIA V5 can be started from the same workstation without upgrading issues.

Rollback of CATIA V5

To avoid data corruption, ensure that all users use the same CATIA V5 release level of patch or service pack for production purposes. If an issue occurs on a new release, access to this release has to be disabled and access to the previous one must be enabled without delay. This can be done by removing the share on the faulty version of CATIA, and sharing the previous one with the same share name. When users restart CATIA, they will thus be automatically directed to the stable version and avoid whatever issues have been discovered with the new release.

For example, to switch back from V5R9SP1 to V5R9 when workstations are using a share named Production Version that points to the V5R9SP1 directory, stop the sharing of the V5R9SP1 directory, and then share the V5R9 directory with the same name (Production Version). No modification is necessary on workstations and rollback is done at the same time for all workstations.

Offline Folders

This feature of Windows was originally designed to help laptop users by allowing them to create a local cache of the files they use on a file server. These cached files could then be worked on while the laptop is disconnected from the corporate network. Any changes, either to the cached files or the versions on the server, are automatically synchronized on reconnection.

The technique can also be used to speed the execution of a code server application such as CATIA. The executables and other files that make up the package can be cached on any computer desktop or laptop on first use. When CATIA is run, the cached versions of these files can be used instead of downloading them again from the code server. This reduces the amount of network traffic generated and helps CATIA to start quickly and perform well.

Offline folders require no extra software to be purchased or installed. A small amount of configuration must be done on the server and on the client, although these procedures can be performed centrally using Group Policy. For this reason, the use of Offline Folders with a CATIA code server installation is highly recommended, even in small deployments.

Using Multiple Code Servers with Dfs

Multiple Code Serving of CATIA V5 can be achieved through the effective use of Microsoft Distributed File System (Dfs). The Distributed File System is a network server component that makes it easier to find and manage data on network infrastructures. Dfs provides a means for uniting folder trees on different computers into a single hierarchy. Dfs also makes it easy to build a single tree of folders from file servers and file server shares on one network.

Many benefits can be gained from Dfs features:

  • Custom hierarchical view of shared network resources.

  • Flexible volume administration.

  • Higher data availability.

  • Load balancing.

  • Name transparency.

  • Integration with Windows NT security model.

  • Dfs client integrated into Windows NT Workstation 4.0, available for Windows 95 and Windows 98.

  • Intelligent client caching.

  • The ability to interoperate with other network file systems.

In a CATIA code server installation, Dfs helps by providing multiple copies of read-only shares. These copies are accessed via a single path. If one of the copies becomes unavailable, an alternate is automatically selected, providing a degree of fault tolerance. In addition, the load placed on code servers is automatically shared. Load balancing in this way helps CATIA scale to cope with large numbers of users. As users request files from the Dfs volume, they are transparently referred to one of the network shares comprising the Dfs volume.

Interoperability with Other Networks

This is an added advantage of Dfs functionality. Any volume that is accessible through a redirector on Windows NT Workstation can participate in the Dfs name space. This can be through either client redirectors or server-based gateway technology. If, for example, your UNIX-based CATIA users store files in a folder on a UNIX server, the folder can be published to Windows users using a Samba server and integrated into the Dfs tree. Windows users thus can access the UNIX folder transparently and share information with UNIX users very easily. For more information on sharing information between UNIX and Windows, see Chapter 8, "UNIX-Windows Interoperability and Data Sharing."

Performance of Code Serving

The code serving approach outlined in this section has been evaluated by Microsoft, Infosys Technologies, and Intel in the CATIA V5 Scalability Tests. These tests show that Code Serving provides good performance in terms of CATIA start time, change workbench time, memory (RAM) used, and processor usage, even with 24 client workstations for each server.

The use of Offline Folders and multiple code servers with Distributed File System further improve performance. For a full description of the scalability and performance tests run on CATIA, refer to the Appendix, "Scalability, Performance and Capacity Testing."

Methodologies

The following subsections explain the methodologies that can be used for code server installations.

Server-side Installation Process

The server installation process is identical to a local installation on a workstation. For a step-by-step run-through, see the "Methodologies" section of Chapter 3, "CATIA Local Installation."

Creating the Runtime Environment

Creation of the runtime environment requires read and write access to the network share where it is stored, and read access to the share where CATIA V5 programs are located.

The environment file is created using the following command at the server:

Setcatenv e environment_name a global d environment_location

where environment_name is a label for the environment, and environment_location is the directory where the environment file will be created.

Note: The setcatenv program is located in the Intel_a\code\bin directory of CATIA V5 shared installation.

In the following example, a batch file creates a new directory for the environment file, then runs the setcatenv command and stores the results in the new directory. In this example;

  • CATIA code is located on a share named \\CATIA.net\CATIA\V0.

  • The environment label is V0.

  • The environment file is located in the \\CATIA.net\CATIA\V0\env directory.

    Rem Directory creation

    Md \\CATIA.net\CATIA\V0\env

    Rem Runtime environment creation

    \\CATIA.net\CATIA\V0\intel_a\code\bin\setcatenv -e V0 -a global -d \\CATIA.net\CATIA\V0\env

    Check to ensure that the example batch file generates a runtime environment file that resembles the following file. A portion of your path (for example, \\CATIA.net\CATIA\VO) will differ from this example.

    !---------------------------------------------------------!

    ! DASSAULT SYSTEMES - V5 ENVIRONMENT FILE !

    !---------------------------------------------------------!

    CATInstallPath=\\CATIA.net\CATIA\V0\intel_a

    CATDLLPath=\\CATIA.net\CATIA\V0\intel_a\code\bin

    CATICPath=\\CATIA.net\CATIA\V0\intel_a\code\productIC

    CATCommandPath=\\CATIA.net\CATIA\V0\intel_a\code\command

    CATDictionaryPath=\\CATIA.net\CATIA\V0\intel_a\code\dictionary

    CATDocView=\\CATIA.net\CATIA\V0\intel_a\doc

    CATReffilesPath=\\CATIA.net\CATIA\V0\intel_a\reffiles

    CATFontPath=\\CATIA.net\CATIA\V0\intel_a\resources\fonts

    CATGalaxyPath=\\CATIA.net\CATIA\V0\intel_a\resources\galaxy

    CATGraphicPath=\\CATIA.net\CATIA\V0\intel_a\resources\graphic;\\CATIA.net\CATIA\V0\intel_a\resources\graphic\icons;\\CATIA.net\CATIA\V0\intel_a\resources\graphic\figures;\\CATIA.net\CATIA\V0\intel_a\resources\graphic\splashscreens;\\CATIA.net\CATIA\V0\intel_a\resources\graphic\symbols;\\CATIA.net\CATIA\V0\intel_a\resources\graphic\textures

    CATMsgCatalogPath=\\CATIA.net\CATIA\V0\intel_a\resources\msgcatalog

    CATFeatureCatalogPath=\\CATIA.net\CATIA\V0\intel_a\resources\featurecatalog

    CATStartupPath=\\CATIA.net\CATIA\V0\intel_a\startup

    CATW3ResourcesPath=\\CATIA.net\CATIA\V0\intel_a\docs

    CATReferenceSettingPath=

    CATUserSettingPath=CSIDL_APPDATA\DassaultSystemes\CATSettings

    CATReferenceStandardPath=

    CATUserStandardPath=CSIDL_APPDATA\DassaultSystemes\CATStandards

    CATTemp=CSIDL_LOCAL_APPDATA\DassaultSystemes\CATTemp

    CATMetasearchPath=DSKEY_TMPDIR

    CATW3PublishPath=DSKEY_TMPDIR

    CATSharedWorkbookPath=DSKEY_TMPDIR

    CATErrorLog=CSIDL_LOCAL_APPDATA\DassaultSystemes\CATTemp\error.log

    CATReport=CSIDL_LOCAL_APPDATA\DassaultSystemes\CATReport

    CATDisciplinePath=

    USER_HOME=CSIDL_PERSONAL

    DB2INSTANCE=%DB2INSTANCE%

    TNS_ADMIN=%TNS_ADMIN%

    ORACLE_HOME=%ORACLE_HOME%

    ORA_NLS33=%ORA_NLS33%

This command also creates shortcuts located on All users\desktop and in the All users\programs menu.

However, these shortcuts are created on the code server and so will be unavailable to clients. For an automated setup process, these shortcuts have to be copied to all workstations so that users can quickly run CATIA.

Client-side Installation Process

The setup of client computers is described in the following procedures, beginning with the components that are always required and then moving on to optional components.

Required Components

C++ Runtime

On a Windows XP Professional workstation, there is no need to add C++ runtime because it ships with the correct version.

If you have an earlier operating system, the Msvcp60.dll file must be copied to the %systemroot%\system32 directory on a Windows 2000 workstation.

Note: The CATSoftwareMgtB P command, found in the CATIA directory Intel_a\code\bin, indicates if the required dynamic-link libraries (DLLs) are up-to-date.

CATIA V5 Shortcuts

The necessary shortcuts were created with the runtime environment by the setcatenv.exe command. However, these will be on the computer where that command was issued (probably the code server itself). You must therefore copy the CATIA shortcuts from the All Users profile on the server to the same location on all client computers.

Optional Components

The following optional components are required only for specific CATIA features. If these are unimportant to you, skip these steps.

Visual Basic for Applications

Microsoft Visual Basic for Applications is needed if users wish to record and replay macros in CATIA. Because CATIA is shipped with an MSI file (Vba6.msi), its installation is straightforward. However, if you are setting up a Windows NT 4.0 Workstation, Windows Installer 2.0 must be installed to be able to install the package.

Windows Installer 2.0 can be downloaded from the Microsoft Website:

https://download.microsoft.com/download/WindowsInstaller/Install/2.0/NT45/EN-US/InstMsiW.exe. Unattended installation of Windows Installer can be done by running this file with a /q switch. Following this installation, reboot the workstation.

The Vba6.msi package, located on CATIA V5 CD-ROM in the VBA directory, could be deployed with a group policy or with the following command:

msiexec /q /i VBA6.msi 

When the installation has been completed, reboot the computer.

Extended Fonts

To install CATIA V5 extended fonts, run the following command on the client:

VE0ifont env environment_name direnv environment_location

where environment_name is the environment label and environment_location is the directory where the environment file is stored.

In the following script sample,

  • CATIA V5 code is located on a share named \\CATIA.net\CATIA\V0.

  • The environment label is V0.

  • The environment file is located in the \\CATIA.net\CATIA\V0\env directory.

\\CATIA.net\CATIA\V0\intel_a\code\bin\vE0ifont -env V0 -direnv

\\CATIA.net\CATIA\V0\env

Tools

The CATIA V5 administration tools (Environment Editor, Nodelock Key Management, Settings Management, and Software Management) should be installed only on clients from which administration of CATIA will be performed. To install them, the following command must be run:

Setcatenv tools cs CATIA

If CATIA V5 code is located on a share named \\CATIA.net\CATIA\V0, the command will be the following:

\\CATIA.net\CATIA\V0\intel_a\code\bin\setcatenv -tools -cs CATIA

OLE Records

OLE records assist the user by allowing CATIA documents to be opened simply with a double-click. To register OLE records, the following command must be executed:

CNEXT /regserver -env environment_name -direnv environment_location

where environment_name is the environment label and environment_location is the directory where the environment file is stored. In the following example,

  • CATIA V5 code is located on a share named \\CATIA.net\CATIA\V0.

  • The environment label is V0.

  • The environment file is located in the \\CATIA.net\CATIA\V0\env directory:

    \\CATIA.net\CATIA\V0\Intel_a\code\bin\CNEXT /regserver -env V0 -direnv \\CATIA.net\CATIA\V0\env

etc\services File

To use process interoperability (for example, between the Dassault applications CATIA V5 and DMU), the Background process needs to be configured on each computer running applications that need to communicate.

To use this service, add the following lines in the services file located in the %windir%\system32\drivers\etc\ directory:

CATIAv5bb 6666/tcp 
CATIAv5run 6667/tcp 

Client-side MSI Package Creation Process

See the Preparing for Code Server Installation section at the beginning of this chapter for help on deciding whether packaging and deployment techniques will be useful. These procedures are based on the AdminStudio tool from InstallShield. Similar techniques may be used with your preferred MSI packaging tool. Examples of using AdminStudio with each of the required and optional client side components are given.

Extended Fonts Component

To install CATIA V5 extended fonts, add each font as a component in the MSI package. Using Administrator Studio 3.0, this can be done with the Component Wizard. This process is described here:

  1. Start the wizard. Select Let me select a type and define components myself and click Next.

  2. Select Fonts and click Next.

  3. Select one font and click Next.

  4. Click Finish.

  5. Repeat these operations for each font and associate font components to the Fonts feature. The list of fonts is displayed in the Setup Design dialog box.

Shortcuts Component

A new component can be created to contain all the shortcuts necessary for users to quickly access CATIA from their desktop.

To perform shortcut packaging, follow this procedure:

  1. Right-click the folder where the shortcut is to be created.

  2. Provide values for the Display name, Argument, Target, and Component text fields as indicated below:

    • Argument: env environment_name direnv environment_directory

      where environment_name is the name of the environment label and environment_directory is the name of the directory where the environment file is stored.

    • Target: CNext.exe

Note: Shortcuts for CATIA administration tools (Nodelock Key Management, Environment Editor, and so on) can be created by using the same components).

Backbone Service

To modify the file services, three custom actions have to be created:

  • One for installation

  • One for un-installation

  • One for rollback

For installation, a Microsoft Visual Basic Scripting Edition (VBScript) file is used that adds the required lines to the services file. Two other VBScripts remove these lines for un-installation and rollback.

The following example script adds lines in services files. To use this code, copy it into a text file and rename it with a .vbs file extension:

'**************************************************************** 
' Add CATIA V5 ports in services file 
'**************************************************************** 
Option Explicit 
Dim WshShell,SystemFolder,Fso,File,Line,CATIA1,CATIA2 
Const ForReading = 1, ForWriting = 2, ForAppending = 8 
CATIA1 = 0 
CATIA2 = 0 
On error resume next 
'Environment variable reading 
set WshShell = CreateObject("WScript.Shell") 
SystemFolder = WshShell.ExpandEnvironmentStrings("%windir%") 
'Services files reading 
set Fso=createobject("scripting.filesystemobject") 
If Fso.FileExists(Systemfolder&"\system32\drivers\etc\services") 
then 
Set File= 
Fso.OpenTextFile(Systemfolder&"\system32\drivers\etc\ 
services",_ForReading,False) 
    Do while Not File.AtEndOfStream 
      Line=File.Readline 
      If Instr(Line,"CATIAv5bb")<>0 then CATIA1=1 
      If Instr(Line,"CATIAv5run")<>0 then CATIA2=1 
   Loop 
   File.close 
     set 
file=fso.OpenTextFile(Systemfolder&"\system32\drivers\etc\ 
services",_ 
     ForAppending) 
   If CATIA1=0 then File.Writeline "CATIAv5bb    6666/tcp" 
   If CATIA2=0 then File.Writeline "CATIAv5run    6667/tcp" 
Else 
   set File= 
Fso.OpenTextFile(Systemfolder&"\system32\drivers\etc\services",_ 
       ForWriting,TRUE) 
   File.Writeline "CATIAv5bb    6666/tcp" 
   File.writeline "CATIAv5run    6667/tcp" 
End if 
File.close 
Set WshShell = Nothing 
Set fso = Nothing 
Set file = Nothing 

The Custom Action Wizard is used in the InstallShield tool, AdminStudio, to create custom actions, including running a script like the one just created.

The following process describes how to use this tool:

  1. Click Next.

  2. Enter the custom action name and click Next.

  3. Select Run VBScript code and Stored in Binary table And then click Finish.

  4. For the In-Script Execution variable, select Immediate execution, and for the Execution Scheduling variable, select Always execute, and then click Next.

  5. Enter the path to the VBScript file you created in the Source box or click Browse to locate the source, and then click Next.

  6. Click Finish.

  7. Having created the custom action to run your script, you must schedule it to run after the InstallInitialize action in the Execute section. To begin this procedure, select the Execute section under the Installation folder.

    cat0404

  8. Select an action located after the Installinitialize button, right-click the action, and then select Insert.

    cat0405

  9. Select the desired custom action and click OK.

This concludes the steps necessary to add lines to the services file.

If you wish to remove CATIA, you must remove the added lines from the services file. The example VBScript that follows performs this task. Instructions for using the script appear after the example.

'**************************************************************** 
' Remove CATIA V5 ports in services file 
'**************************************************************** 
Option Explicit 
Dim WshShell,SystemFolder,Fso,File,File2,Line 
Const ForReading = 1, ForWriting = 2, ForAppending = 8 
On error resume next 
'Environment variable reading 
set WshShell = CreateObject("WScript.Shell") 
SystemFolder = WshShell.ExpandEnvironmentStrings("%windir%") 
'Services files reading 
set Fso=createobject("scripting.filesystemobject") 
If Fso.FileExists(Systemfolder&"\system32\drivers\etc\services") 
then 
   Set 
File=Fso.OpenTextFile(Systemfolder&"\system32\drivers\etc\ 
services",_ 
ForReading,False) 
   set 
File2=Fso.OpenTextFile(Systemfolder&"\system32\drivers\etc\ 
services.rmv",_ 
ForWriting,True) 
    Do while Not file.AtEndOfStream 
      Line=file.Readline 
       If Instr(Line,"CATIAv5run")=0 and 
Instr(Line,"CATIAv5bb")=0 _ 
    then File2.writeline(Line) 
   Loop 
   File.close 
   File2.close 
'renaming service.rmv in service 
   Fso.DeleteFile(Systemfolder&"\system32\drivers\etc\ 
services") 
   Fso.copyfile 
Systemfolder&"\system32\drivers\etc\services.rmv",_ 
  Systemfolder&"\system32\drivers\etc\services" 
   Fso.DeleteFile(Systemfolder&"\system32\drivers\etc\ 
services.rmv") 
End if 
set Fso = Nothing 
set WshShell = Nothing 
set File = Nothing 
set File2 = Nothing 

To use this script, you must create a new text file, copy the above code into it, and rename it with a .vbs file extension. Then use the previously described Custom Action Wizard to create a custom action and schedule it with AdminStudio. To be able to do rollbacks, you must insert the script in a new custom action as indicated above except for the Execution Condition where Rollback Execution must be selected:

  • Select Rollback execution in the In-Script Execution box and Always execute in the Execution Scheduling box, and then click Next.

    cat0406

This action has to be inserted in Execute section after the first custom action.

To remove lines in the services files during un-installation, the last script has to be inserted in a new custom action (as indicated above) with an Immediate Execution condition. However, to execute this action only when removing the package, the following condition must be added to the new custom action: REMOVE="ALL" (see Figure 4.4).

Figure 4.4:

Figure 4.4:

OLE Records

For file services modifications, three custom actions have to be created to register OLE records:

  • One for installation

  • One for uninstallation

  • One for rollback

The approach here is exactly the same as for updating the services file in the previous section. A VBScript file is created to perform each task. AdminStudio is then used to create a custom action that runs the script and to schedule the action to run.

For installation, you can use a VBScript that runs the following command:

CNEXT /regserver env environment_name direnv environment_location

where environment_name is the environment label and environment_location is the directory where the environment file is stored. An example script is presented here:

'********************************************************** 
' register ole records 
'********************************************************** 
Option Explicit 
Dim WshShell 
set WshShell = CreateObject("WScript.Shell") 
WshShell.run "\\CATIA.net\CATIA\v5r9\intel_a\code\bin\CNEXT 
/regserver -env v5r9 _ 
-direnv \\CATIA.net\CATIA\v5r9\env",0,TRUE 

The customs actions for un-install and rollback launch a VBScript that runs the following command:

CNEXT /unregserver

The following VBScript runs this command:

'********************************************************** 
' unregister ole record 
'******************************************************** 
Option Explicit 
Dim WshShell 
set WshShell = CreateObject("WScript.Shell") 
WshShell.run "\\CATIA.net\CATIA\v5r9\intel_a\code\bin\CNEXT 
/unregserver",0,TRUE 

Note: For file services modification, the custom action dedicated to uninstallation must have the REMOVE="ALL" condition set and the custom action dedicated to rollback must have Rollback execution set in the in-script execution option.

Creating an MSI Package for the C++ Runtime Library

The C++ runtime library is a required component on client computers in a code server installation of CATIA. To deploy the library on Windows 2000 workstations, a MSI package can be used. This is not necessary on a Windows XP computer because it ships with the correct library.

The MSI package must contain the files Msvcp60.dll and Msvcrt.dll. Create the MSI package using the procedures already outlined for adding components to MSI packages. It consists of only two merged modules (Microsoft C Runtime Library and Microsoft C++ Runtime Library):

Offline Folders

To set up Offline Folders requires configuration steps on the server and the client. The client portion can be automated using Group Policies, which you may have already used to install MSI packages.

Configuring Servers to Enable Offline Folders for Client Side Caching

To activate Offline Folders, complete the following procedures on the server:

  1. Right-click the folder to be shared and select Sharing.

  2. Click Share this folder and type the share name in the Share name box. Click Caching.

  3. In the Caching Settings dialog box, select the Automatic Caching for Programs option in the Setting box.

  4. Validate by reading the text that appears, and click OK.

Configuring Workstations to Enable Offline Folders for Client Side Caching

The following procedure describes the manual configuration of Offline Folders at the client. If you wish to use Group Policy to automate this process, proceed to the next section.

Configuring Workstations for Client Side Caching

To configure workstations, follow these steps:

  1. Click My Computer.

  2. Click the Tools menu and select Folder Options.

  3. Select the Offline Files tab.

  4. Validate that Enable Offline Files is activated and set the Amount of disk space use for temporary offline files to the desired value. Click OK.

Centralized Configuration Using Group Policy

Note: This configuration can be used only if the workstations are parts of a Windows 2000 domain.

To configure using Group Policy, follow these steps:

1. From the Start menu, point to Programs, point to Administrative Tools, and then click Active Directory Users and Computers to open the MMC console.

2. Select the desired Organizational Unit.

3. Right-click and select Properties.

4. Select the Group Policy tab.

5. Select the desired Group Policy.

6. Click Edit.

7. In the Tree pane of the Group Policy window, select Computer Configuration, then select Administrative Templates, then Network, and then Offline Files. In the Policy pane, select Administratively Assigned Offline Files.

8. In the Policy pane, double-click Enabled policy.

9. In the Enabled Properties dialog box, click Enabled and then click Apply.

10. In the Policy pane, double-click Default Cache Size Properties.

11. Click Enabled. Set the percentage disk space to be used. Click Apply and close all windows.

Multiple Code Serving with Dfs

The Dfs Service is auto-installed with the installation of Windows 2000 Server.

Two types of Dfs roots can be configured on Windows 2000 Server computers: stand-alone and domain. Further details of the methodologies presented here can be found at https://www.microsoft.com/windows2000/techinfo/planning/fileandprint/Dfssteps.asp

Stand-alone Dfs Roots

The following list details the properties of stand-alone Dfs roots.

  • Stand-alone Dfs information is stored in the local registry.

  • A stand-alone Dfs root permits a single level of Dfs links.

  • When the Distributed File System snap-in is used to connect to existing stand-alone Dfs roots, all servers known to the browse list are retrieved because there is no unique NetBIOS name registered by Dfs-enabled servers.

  • Stand-alone Dfs roots can be located on all supported file systems, although locating resources on NTFS-formatted partitions is recommended.

  • Stand-alone Dfs roots offer no replication or backup; the Dfs root represents a single point of failure.

Configuring a Stand-alone Dfs Root

A stand-alone Dfs root is physically located on the server that users initially connect to.

To create a stand-alone Dfs root, follow these steps:

  1. Use the Distributed File System snap-in to start the New Dfs Root wizard.

  2. Select the Dfs Root Type.

  3. Specify the Host Server For The Dfs Root.

  4. Specify the Dfs Root Share.

  5. Name the Dfs Root.

  6. Complete the New Dfs Root Wizard.

Domain Dfs roots

The following list details the properties of Domain Dfs roots.

  • Multiple servers hand out referrals for the Dfs namespace.

  • A fault-tolerant Dfs root is stored in Active Directory services and is replicated to every participating Dfs root server. Changes to a Dfs tree are automatically synchronized with Active Directory services.

  • Fault-tolerant roots must be located on NTFS version 5.0 formatted partitions.

  • The list of domains and servers is populated by querying the global catalog for all fault-tolerant Dfs roots.

  • Dfs replication topology uses the existing Active Directory replication topology.

Configuring a Domain Dfs Root

Domain Dfs writes the Dfs topology to the Active Directory store, which allows links to point to multiple identical shared folders for fault tolerance.

Domain Dfs supports DNS, multiple levels of child volumes, and file replication.

Follow this procedure to create a domain Dfs root:

  1. Use the Distributed File System snap-in to start the New Dfs Root wizard.

  2. Click Next.

  3. Make sure that Create a domain Dfs root is selected, and then click Next.

  4. Select the host domain for the Dfs root (for example, Catia.com), and then click Next.

  5. Accept the name of the host server for the Dfs root. For example, CATIADC.Catia.com. Click Next.

  6. Choose the local share point to be used on the target to host the Dfs root. For example, click Create a new share and type the path to share as c:\CatiaV5R10 and the share name as Production. The snap-in lets you create both a new share and new directory if they do not already exist.

  7. Click Next. If the specified folder does not exist, you are asked if you want to create it. Click Yes to continue. Add a comment if you wish to further describe this root. Click Next.

  8. Click Finish to create the Dfs root. After the Create New Dfs Root Wizard has completed, you are ready to administer your Dfs root.

Configuring New Dfs Links

Users can browse folders under a Dfs root without knowing where the referenced resources are physically located. After you create the Dfs root, you can create Dfs links.

To create a Dfs link, follow these steps:

  1. Use the Distributed File System snap-in to open the Create a New Dfs Link dialog box.

  2. Provide a name for the link in the Link name text box. This is the common name available to users.

  3. Provide a path for the Send the user to this shared folder text box. This path points to the actual shared folder.

  4. Add a comment in the Comment text box, if necessary.

  5. Enter a value in the Clients Cache This Referral For x Seconds text box.

Dfs links appear below the Dfs root in the Distributed File System snap-in.

Installation Validation

Installation validation of CATIA thin client setup with offline folders enabled and Dfs is discussed below.

Offline Folders

To check Offline Folders, follow these steps:

  1. Open a Microsoft Explorer window.

  2. From the Tools menu, select Offline Files and check the Enable Offline Files option if it is not already checked.

  3. Click View Files. Assuming that CATIA is the only offline-enabled folder, then the view will be empty.

CATIA V5

Follow these steps to create and run the validation macro:

1. Open CATIA

2. From the Tools menu, point to Macro and then select Macros (alternatively, press Alt-F8).

3. Click Macro libraries.

4. Select Directory as the Library type.

5. Click Add existing library.

6. Select the Directory for the Macro library and click OK. The Directory selected gets added to the Current libraries.

7. Close the Macros libraries dialog box.

8. Click Create in the Macros dialog box to create a new macro.

9. Select the Macro language as CATScript and provide a name type in the Macro name box. Click OK.

10. Click Edit to edit the Macro.

  1. Insert the following lines of code in between the Sub CATMain () and End Sub lines.

Dim documents1 As Documents Set documents1 = CATIA.Documents Dim partDocument1 As Document Set partDocument1 = documents1.Add("Part") Dim part1 As Part Set part1 = partDocument1.Part Dim hybridBodies1 As HybridBodies Set hybridBodies1 = part1.HybridBodies Dim hybridBody1 As HybridBody Set hybridBody1 = hybridBodies1.Add() part1.Update Dim sketches1 As Sketches Set sketches1 = hybridBody1.HybridSketches Dim originElements1 As OriginElements Set originElements1 = part1.OriginElements Dim reference1 As AnyObject Set reference1 = originElements1.PlaneZX Dim sketch1 As Sketch Set sketch1 = sketches1.Add(reference1) Dim factory2D1 As Factory2D Set factory2D1 = sketch1.OpenEdition() Dim geometricElements1 As GeometricElements Set geometricElements1 = sketch1.GeometricElements Dim axis2D1 As GeometricElement Set axis2D1 = geometricElements1.Item("AbsoluteAxis") Dim line2D1 As AnyObject Set line2D1 = axis2D1.GetItem("HDirection") line2D1.ReportName = 1 Dim line2D2 As AnyObject Set line2D2 = axis2D1.GetItem("VDirection") line2D2.ReportName = 2 Dim circle2D1 As Circle2D Set circle2D1 = factory2D1.CreateClosedCircle(0.000000, 0.000000, 31.622777) Dim point2D1 As AnyObject Set point2D1 = axis2D1.GetItem("Origin") circle2D1.CenterPoint = point2D1 circle2D1.ReportName = 3 sketch1.CloseEdition part1.Update Dim bodies1 As Bodies Set bodies1 = part1.Bodies Dim body1 As Body Set body1 = bodies1.Item("MechanicalTool.1") part1.InWorkObject = body1 Dim shapeFactory1 As Factory Set shapeFactory1 = part1.ShapeFactory Dim pad1 As Pad Set pad1 = shapeFactory1.AddNewPad(sketch1, 20.000000) part1.Update ]

11. Save the macro and run the macro. A circular pad is created.

12. Follow the three steps under Offline Folders to view the Offline Files, which should now show CATIA.

Installation Validation for Dfs

Any user of Windows 2000 logged on to your domain can now access the fault tolerant Dfs. Assuming they have proper access privileges, they can negotiate the individual junctions by using the following commands.

From the Start menu, select Run, type cmd in the Open box, and click OK. Then type:

NET USE driveletter:\\your_domain_name\your_Dfs_share_name

For example, your command might look like:

NET USE J:\\Catia.COM\Production

Summary

In code server configuration, administrative effort is reduced because the main installation is performed once on the code server. Only a small setup is required on the client computers. With a large number of clients, this part of the process can be automated using packaging and deployment methods like those described in Chapter 3.

Further increases in performance are gained by enabling Offline Folders, a feature built into Windows 2000 and later Microsoft operating systems. Here, the executable code is cached on the client computers, removing the need to download them before execution. This results in both faster execution and less network traffic. The Distributed File System (Dfs) is also useful in this situation, because it can provide fault tolerance and load balancing.

Disclaimer and Copyright Information

CATIA is a registered trademark of Dassault Systemes SA. The names of other actual companies and products mentioned herein may be the trademarks of their respective owners.