Applications.OpenDocumentFile is not working (Opening Multiple Revit Files)

Hi guys

I am trying to open multiple Revit files to extract some parameters from their elements. I used Application.OpenDocumentFile node from Rhythm package but I don’t know why it doesn’t work for me (See below). Does anybody have an idea about this issue?
Thanks

Your screenshot has the answer I believe.

image

Simply put, you don’t have access to those files due to permissions. The same thing would happen if you tried to open the files via the UI.

1 Like

Thanks for your response. But I already asked the node to detach the models from Central. Isn’t it enough? It works in my colleague’s computer but it doesn’t in my PC

Yeah, you are more than likely missing permissions on your user account… Try it through the Revit UI real quick. File > Open > Detach From Central and report back the result.

Thanks John. Do you mean I must open each Revit model first, detach them from central, and save them as a detached file before running the dynamo script. Isn’t there any way to do it automatically in Dynamo?since I need to read multiple Revit models (e.g. 15 or 20 models) for Quantity Take Off, it will be time consuming for me

Thanks

I am saying to try it on one file and see if you get the same error message. If you do, then you have a permissions issue on your network that absolutely needs to be fixed to continue.

To Summarize: This is a problem on your side with your company’s setup regarding your user account’s priveliges and is not a Dynamo problem.

Once your permissions are fixed, then you can automate with Dynamo.

Simple Google result about permissions :point_right: : https://support.microsoft.com/en-us/help/2623670/access-denied-or-other-errors-when-you-access-or-work-with-files-and-f

1 Like

I tried on one model but it still doesn’t work

I manually opened the Revit model and saved it as a detached file and ran the script and it worked as shown below.

Is there anyway to do it automaically in Dynamo instead of opening each model and saving them as a detached file? it is time consuming to do it on 30 models each time.

Thanks

Your IT appears to have locked you out. Try coping all the files onto your C drive first.

3 Likes

Thanks @jacob.small :slight_smile:

1 Like

Please help me