I am trying to delete some elements from my Revit model using Sprins node “Doc.DeleteElements” which takes a boolean input to confirm the operation or not. I am trying to first copy my file to another folder automatically and then trigger the next deletion node by the output of the copy node. However the problem is that FileCopy node gives the same output “Null” whether it works or not.
The reason why it returns null is because the output says
void is the return type. It means “this method returns nothing”. If you ignore null File.Copy should work for you. Hope that makes sense!
Thank you for your reply. I understand the idea of void but maybe I was not clear enough with my problem. My problem how to distinguish automatically whether the copying node did its job or not. Is there, for example, a node or a way to tell that a specific node gave an error or not?
I just do not want to delete elements without the copying process been done properly and want to produce an error message to warn the user. Anything to differentiate between the two statuses of the copying is what I want.
There are many ways to solve this:
Build custom node using Public Static String method in C#.
Create Python script to copy files.
Read the counts of the files in directory and create logic If the files Count exceeds returns “True”(if the files are copied).
Choice is yours
I like the third one. Thank you very much!