Open file, detach, audit, run graphs, save and close

HI,
Im not really sure if this is possible or not, but ill ask anyway.
I am in the process of creating a large “project file clean-up” tool and i ahve a series of graphs in a single file which does:
Remove imported .dwg files
Removes imported .dwg line styles
Removes sheets which do not meet a parameter requirement
Removes all non-required views.
I am also working on a graph to remove all non-used / standard sub-categories (not quite working yet)

What i would like to do is open this file in the background, using the detach from central option, run the above scripts and then save the file to a designated folder location.

I have seen the Applications.OpenDocumentFile and Application.CloseDocument nodes (at the bottom of the image), but i just dont know how to patch these as the graphs above dont have a Document input?

Is there a way to do this?

Can you zoom in and retake the picture so that we can see what nodes you are using? Thanks!

are you doing it for a lot of files at one go? or just single files? well, if you are doing for a lot of files, i would suggest you to write everything i python script. so that it can be processed file by file.

and also, do share your dyn and rvt files so that we can test it out for you. To answer your post, yes it can be done. I myself have done it before but is just purely detaching and saving to other location. With a little python scripting, it can be done
Link

Maybe running a journal file can help.

1 Like