Automatically update your shared model
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.
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.
You need to install BIM Publisher extension from Tekla Warehouse BIM Publisher
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)
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.
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
- Open the BIM Publisher Settings from Windows start menu.
- At the General settings tab, remove other versions and leave one row and browse to the bypass.ini which you modified earlier:Image
- 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
- Scheduling tab you can leave empty:
- Then save your settings and close the BIM Publisher Settings.
- In the Windows start menu, type in Task Scheduler and start the Task Scheduler application.
- Create a new task "BIMPublisher"Image
- At the General tab, give some name for you settings, here BIMPublisher and select the Windows operating system.
- 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.
- 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.
- Click OK to save the settings.
- To check your task, select Task Scheduler Library in the tree:Image