Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.



Quick video tutorial: Using Python with TK Data Access, Using Python with Script Task, Using Python with Code Behind (no audio)


The programming in many of your projects will consist of C# or VB.Net 100% managed code that is designed to run in the Microsoft .NET framework.



Tatsoft provides the file. When you use it, you need to make sure the installPath into the file is with the correct path of the FactoryStudio is installed in the same folder as FactoryStudio. 

Below are some methods from that you can use:


The Python code using the module in is described below:

Code Block
import sys
from Extensions.TKDataAccess import TKDataAccess dataAccess = TKDataAccess()
connectionStatus = dataAccess.Connect("", "guest", "") print("Connection: " + connectionStatus)

if dataAccess.IsConnected() :
ret  =  dataAccess.GetObjectValue("Tag.tag1") print("Value: " + str(ret)) dataAccess.SetObjectValue("Tag.tag2",  ret)


Then, you need to create a the code that is shown below or create a Python Script Task that executes the file, which contains the calling for TKDataAccess shown above. So here, we will use the Python namespace as previously described.