1

My intention is to open and close a file located on BIM360 via python to force sync Desktop Connector.

import os
filepath = "C:\\Users\\{}\\ACCDocs\\XXXX\\Project Template\\Project Files\\File.txt".format(os.environ['USERNAME'])
file = open(filepath, "r")
file.read()
file.close()

I have tried this through RevitPythonShell and Python Script node in dynamo and when reading the file it returns 'Proxy\n' and does not sync the file

Just a side note; using OOTB dynamo nodes 'File Path' node to 'FileSystem.ReadText' node, DOES read the file and force sync.

edit: additional side note, opening and reading the file from a python terminal in vscode was also successful in forcing the sync.

edit2: 'File From Path' node to 'FileSystem.ReadText' node, does not work and returns 'Proxy' as well.

Marcus
  • 21
  • 4
  • The file that you show in your code snippet is on you local desktop in the `C:` drive. I do not see how this is connected with BIM360 in any way. Can you explain? – Jeremy Tammik Feb 07 '22 at 09:33
  • Since you say that you can achieve what you require using the Dynamo node, and since Dynamo is completely open source, you can look at the Dynamo node source code to see how it is doing it. – Jeremy Tammik Feb 07 '22 at 09:37
  • Unfortunately, the maintainer of RPS has stepped down and it is currently not maintained at all. The best direction to move forward using Python with the Revit API is probably the well maintained and tremendously popular [pyRevit environment](https://github.com/eirannejad/pyRevit). – Jeremy Tammik Feb 07 '22 at 09:40
  • 'ACCDocs' is the root of Autodesk Docs. You can access your BIM360 directories through Windows File Explorer. – Marcus Feb 08 '22 at 18:39
  • Sad to hear about RPS I do all my testing there, without command line I would go nuts. – Marcus Feb 08 '22 at 18:41
  • There was a discussion about adding similar functionality to pyRevit. You can look at the list of issues in the two GitHub repositories and/or raise a new issue for that wish. Ask Ehsan. – Jeremy Tammik Feb 09 '22 at 21:03

0 Answers0