Create start-up shortcuts with customized initializations

Tekla Structures
2023
Tekla Structures

Create start-up shortcuts with customized initializations

To use the correct .ini files for a specific project, you can create shortcuts to start teklastructures.exe with customized initializations.

You can use this functionality to create shortcuts for different purposes, for example, to have customized setup files depending on the client you are working for in a project. The Tekla Structures installation automatically creates shortcuts for the selected environments.

Note:

We recommend that only administrators create the customization and the necessary shortcuts. Otherwise, your settings may differ from the settings defined for your firm, or for the particular project you are working for.

For more information about initialization files (.ini files), see initialization files (.ini files).

Create a start-up shortcut with customized initialization

  1. Create a customized initialization file.
    1. Open the user.ini file using any standard text editor.

      The user.ini file is located in ..\Users\<user>\AppData\Local\Trimble\Tekla Structures\<version>\UserSettings on your computer.

    2. Save the file with a new name, such as customer.ini or project.ini.
    3. Add the required settings to the file, then save the modified initialization file.
  2. To make a copy of the default shortcut, right-click Tekla Structures <version> shortcut on your desktop, select Copy, then paste the shortcut to your desktop.
  3. Right-click the shortcut, then select Properties.
  4. In the Target field, enter the path to the current teklastructures.exe, then the project initialization parameters.

    If the path contains spaces, use quotation marks (") around the path. For example, "C:\Program Files\Tekla Structures\"

    Tip:

    The maximum length of a shortcut is 256 characters. If your shortcut is too long, you can call all other necessary initialization files from your customized initialization file instead of adding them to the shortcut.

  5. To override the settings defined in the shortcuts, use the parameter -i <initialization_file> in the user.ini and option.ini files.

Available parameters in shortcuts

You can use these parameters in start-up shortcuts.

You can use the parameters in combinations. For example, you can set the parameters to automatically bypass the Tekla Structures - Choose setup dialog box, open a model, and run a macro.

Parameter Description

-I <ini_file_path>

The given .ini file is loaded before the environment .ini files. This parameter can be specified multiple times.

This parameter can be used to bypass the Tekla Structures - Choose setup dialog (the login dialog).

Example:

"C:\Program Files\Tekla Structures\<version>\bin\TeklaStructures.exe" -I "C:\ProgramData\Trimble\Tekla Structures\<version>\Environments\uk\Bypass.ini"

-i <ini_file_path>

The given .ini file is loaded after the role .ini files. This parameter can be specified multiple times.

Example:

"C:\Program Files\Tekla Structures\<version>\bin\TeklaStructures.exe" -i "C:\TeklaStructures\MySettings.ini"

To open an existing model

<model_path>

The given model is opened after start-up.

Example:

"C:\Program Files\Tekla Structures\<version>\bin\TeklaStructures.exe" "C:\TeklaStructuresModels\My model"

To open an existing, autosaved model

<model_path> /autosaved

The given autosaved model is opened after start-up.

Example:

"C:\Program Files\Tekla Structures\<version>\bin\TeklaStructures.exe""C:\TeklaStructuresModels\My model" /autosaved

To create a new model without a model template

/create:<model_path>

A new model is created after start-up.

Example:

"C:\Program Files\Tekla Structures\<version>\bin\TeklaStructures.exe"/create:"C:\TeklaStructuresModels\My model"

To create a new model using a model template

/create:<model_path> /modelTemplate:<template_name>

A new model using a model template is created after start-up.

Example:

"C:\Program Files\Tekla Structures\<version>\bin\TeklaStructures.exe"/create:"C:\TeklaStructuresModels\My model" /modelTemplate:"Cast-in-Place"

To create a new multi-user model

/create:<model_path> /server:<server_name>

A new multi-user model is created after start-up.

Example:

"C:\Program Files\Tekla Structures\<version>\bin\TeklaStructures.exe"/create:"C:\TeklaStructuresModels\My model" /server:"my-server:1234"

To run a macro after start-up

-m <macro_file_path>

The given macro is executed after start-up.

The example below opens Tekla Structures, sets the environment, role and configuration from the Bypass.ini file, opens the model, and reads in and saves the model by using the Example Macro: Model Sharing Read in and Save from the BIM Publisher tool that is available in Tekla Warehouse.

"C:\Program Files\Tekla Structures\<version>\bin\TeklaStructures.exe" -I "C:\ProgramData\Trimble\Tekla Structures\<version>\Environments\<environment>\Bypass.ini" "C:\TeklaStructuresModels\<model>" -m "C:\ReadInSave2016.cs"

Example of an initialization file

This example shows a customized project initialization file that calls other initialization files.

MyProject.ini
//The project is based on the default UK settings
call C:\ProgramData\Trimble\Tekla Structures\2019.0\Environments\uk\env_UK.ini
//..but our company policy requires these changes
call c:\CompanySettings\OurPolicy.ini
//..and the fabricator requires something
call c:\Fabricators\Fabricator1.ini
//..and then we let users to make some changes (color etc.)
call c:\Users\user_%USERNAME%.ini

The project shortcut for this initialization file:

"C:\Program Files\Tekla Structures\<version>\bin\TeklaStructures.exe" -i "\\MyServer\MyProject\MyProject.ini" "\\MyServer\MyProject\MyModel\"

Bypass the sign in dialog box

You can bypass the sign in dialog box by creating a start-up shortcut that uses a customized Bypass.ini file.

  1. In a text editor, open an existing Bypass.ini file.

    You can find the Bypass.ini file for each environment in the %XSDATADIR%\Environments\<your environment> folder.

  2. Set the following advanced options in the customized Bypass.ini file:

    For example:

    set XS_LICENSE_SERVER_HOST=https
    set XS_DEFAULT_LICENSE=DIAMOND
    set XS_DEFAULT_ENVIRONMENT=%XSDATADIR%\Environments\uk\env_UK.ini 
    set XS_DEFAULT_ROLE=%XSDATADIR%\Environments\uk\role_Engineer.ini 
  3. Save the modified Bypass.ini file.
  4. Right-click Tekla Structures <version> shortcut on your desktop, then select Copy.
  5. Paste the shortcut to your desktop.
  6. Right-click the new shortcut, then select Properties.
  7. In the Target field, enter the path to teklastructures.exe, followed by the parameter -I (capital i) , then the path to the Bypass.ini file.

    If you have installed Tekla Structures in a path that contains spaces, use quotation marks (") around each path.

    An example of the modified target:

    "C:\Program Files\Tekla Structures\2022\bin\TeklaStructures.exe" -I 
    "C:\ProgramData\Tekla Structures\2022\Environments\uk\Bypass.ini"
Var det här användbart?
Föregående
Nästa