Automatically update your shared model

Tekla Structures
Not version-specific
Tekla Structures
Environment
Not environment-specific

Using BIM Publisher extension it is possible to automate some tasks. Like for example make your shared model updated before you come to office. This example shows how to make a setup which automatically opens your shared model, makes read in, saves the model and exits Tekla Structures every day 6:00.

Image
icon_tip.png

In Tekla Structures 2020 version you can make an automatic model upload to Trimble Connect project always when writing out or doing a baseline if you set the XS_UPLOAD_SHARED_MODEL_TO_CONNECT to WRITEOUT or BASELINE. For more infomation, see Easier Trimble Connect collaboration.


  1. You need to install BIM Publisher extension from Tekla Warehouse BIM Publisher
  2. Download also the following example macro from the same page as BIM publisher: Model Sharing Read in and Save (2016+) This is just a file ReadInSave2016.cs containing macro, you can save it to somewhere easily available, in this example we save it to downloads folder: C:\Users\kke\Downloads\macros\.
    You can also modify the bolded text in the macro code to do different model sharing operations:
    akit.Callback("acmdRunPluginMethod", "SharingToolsFeature;Tool.SharingAutomation;r0.00:00:00", "main_frame")
            w+r0.20:00:00    (write out, read in today at 20:00)
            r1.07:00:00      (read in tomorrow at 07:00)
            w                (only write out)
            w+e              (only write out and exit if successful)
            w+c              (only write out and create baseline)
     
  3. Open Tekla Structures and log in with your user account and passwork and check Remember me checkbox so that you are logged in automatically when Tekla Structures starts.
  4.  Modify the bypass.ini in your environment, here we use default environment and bypass.ini in this location C:\TeklaStructures\2017i\Environments\default. We remove the "rem"s in front of the following lines, but this depends on what environment, role and license you have:
set XS_DEFAULT_ENVIRONMENT=%XSDATADIR%\environments\default\env_Default_environment.ini
set XS_DEFAULT_ROLE=%XSDATADIR%\environments\default\role_All.ini
set XS_DEFAULT_LICENSE=FULL
  1. Open the BIM Publisher Settings from Windows start menu.
  2. At the General settings tab, remove other versions and leave one row and browse to the bypass.ini which you modified earlier:
    Image
    BIMPublisher_example3.png
  3. On the Exports tab, add your local model folder to Model folder field and leave the Export folder empty. Leave the Models and Drawings tabs empty. On the Macros tab, add the ReadInSave2016.cs macro to the Run these macros before exports field:
    Image
    BIMPublisher_example2.png
  4.  
  5. Scheduling tab you can leave empty:
  6. Image
    BIMPublisher_example4.png
  7. Then save your settings and close the BIM Publisher Settings.
  8. In the Windows start menu, type in Task Scheduler and start the Task Scheduler application.
  9. Create a new task "BIMPublisher"
    Image
    BIMPublisher_example5.png
  10. At the General tab, give some name for you settings, here BIMPublisher and select the Windows operating system.
  11. At the Triggers tab, click New to add a new time, for example Daily, start date and time and make sure that Enabled is checked.
  12. At the Action tab, click New and  select action Start a program and browse to the BIM Publisher exe file: C:\Program Files\Tekla Structures\BIMPublisher\BIMPublisher.exe, no other arguments needed.
  13. Click OK to save the settings.
  14. To check your task, select Task Scheduler Library in the tree:
    Image
    BIMPublisher_example6.png


Czy to było pomocne?