I’m trying to use Document.SaveAs node but it seems like I’m having a trouble with File Path.
I thought filePath wants a location where the file wants to get saved and i tried different ways but no good. Any tips would be greatly appreciated.
So what I want to achieve here is set up a folder path where Dynamo can save the file at. I thought that’s what this node is doing since SAVE AS is a function where a user can save the copy of the file in a DIFFERENT location.
So i’m curious why I have to put rvt at the end where it sounds like its going to override the original file?
Please note the difference between the Dynamo document and the API document (without wrapper).
Unfortunately it’s not possible to use Dynamo documents with custom nodes so use another node to obtain the current document.
I guess I couldn’t decipher the difference between the two. So I tried to save my current Revit Project @ new location (Directory Path) but its throwing an error. I thought this is how this node works but I guess I’m completely misunderstanding something. Could you please share any tips on how to use this? or which node should I use for ‘SAVING AS’ function.
Directory path will not work on it’s own as mentioned previously by @simon_murphy1 .
Feed in an actual file path with a full filename and .rvt extension and the node will work.
To reiterate why the directory node does not work, if you were to point your Revit file open menu to your desktop and say “open revit file” without selecting a file, what would you expect revit to do? Well, it is going to do nothing because you did not select a file.
The node is really nice and it works for the central file!
However I’m trying to save a detached copy and it seems like the node does not read a detached copy.
so the process i took was. I opened a Revit project with detached copy and ran my script.
‘SAVE AS’ is Document SaveAs node from Genius Loci and it’s value comes out to be ‘true’ when I run with non-detached file but detached file will throw false.
@Alban_de_Chasteigner thank you very much i guess i forgot to put ‘true’ value for saveAsCentral and isWorkShared.
Quick question - I tried something with BIM 360 files and it seems to not read - which I kinda assumed since the file location of the BIM360 works differently.
Note that each of hte first 3 inputs are strings in a GUID format, and the Revit API documentation directly indicates that you’ll need to use the Forge data management API (part of the Autodesk Platform Services tools). This means you need an APS cloud tool to get the inputs needed to call the tool. This means you now have two options:
Build an APS app to get that input data so you can build another tool to save a model as a cloud model
Build an APS app to save the model as a cloud model
Note that the first bullet also requires putting the application GUID into a public facing setup, and that needs to be added to each project to be called. So you’re doing a lot of stuff to access the data in Dynamo, while a stand alone APS app has less headaches for setup and less moving parts to deal with.
And so everyone I know who does this (there are a lot), utilizes a stand alone APS app not a dynamo integrated APS app.
Thank Jacob for your answer. But as i see, it is not a simple thing to do for a bigenner in coding like me. I just can put few line in python with the dynamo script, but create an APS and use Forge, it is a big job
Hello @jacob.small
Sorry if i ask more and more.
I try it with APS, but it is complicted here because a lot of resctriction with our IT teams, each time i must have permission to run some package, and it is not fun
I just wanna ask, about thz first methode u tell me :
Build an APS app to get that input data so you can build another tool to save a model as a cloud model
I build the APS, that do nothing, i just need the client and the secret code ? and i can put them in a node in dynamo ?