Teamcenter is a product lifecycle management software owned by Siemens. ilogic is an automated programming design program in inventor software. How to automatically download the 3D model in teamcenter through the iLogic automation programming program?
In fact, it is very simple, we only need to program with the following code.

  1. ‘Creates new instance of TCAIAPI.Application
  2. tcaiAppl = CreateObject(“TCAIAPI.Application”)
  3. ‘Starts Inventor application, if necessary, and connects to TCAI
  4. tcaiAppl.StartConnection()
  5. ‘Gets the TCAIAPI.FileManager object
  6. tcaiFileManager = tcaiAppl.FileManager
  7. ‘Defines the filename to be searched
  8. Dim filenames(3)
  9. filenames(0) = “D000307115.iam”
  10. filenames(1) = “30089125.iam”
  11. filenames(2) = “30089126.iam”
  12. filenames(3) = “30089229.ipt”
  13. ‘Search datasets by filename
  14. datasetUidsByFilenames = tcaiFileManager.FindLatestDatasetsByFilenames(filenames)
  15. keys = datasetUidsByFilenames.Keys()
  16. For i = 0 To UBound(keys)
  17.         key = keys(i)
  18.         vals = datasetUidsByFilenames(key)
  19.         For j = 0 To UBound(vals)
  20.                 dsInfo = vals(j)
  21.                 datasetUid = dsInfo.DatasetUid
  22.                 ‘Defines the revision rule to be applied in case of BOM expansion
  23.                 options = CreateObject(“Scripting.Dictionary”)
  24.                 Call options.Add(“DownloadiMembers”, “1”)
  25.                 ‘Gets file in TCAI cache folder
  26.                 Call tcaiFileManager.GetFile(datasetUid, options)
  27.         Next
  28. Next

The meaning of the code in the previous paragraph is to download the drawing number of the 3D model. This requires us to define, we can download in batches, and then set it as an array, so that the models can be downloaded in batches.
The member information in the latter paragraph refers to whether to download the member information of its iPart or assembly.
In this way, when we are doing automation design and programming, we only need to insert the code to download the three-dimensional model we need for assembly or other operations.
Hope our tutorial is helpful to everyone.

Leave a Reply