Load Groups into revit with Dynamo


#1

My question regarding Dynamo on revit is:

Is it also possible to load one or multiple model or detail Groups? I tryed to do this, but I think I’m missing something.
I tryed the directory path
I Hope someone can help me with this.


#2

Is the issue here that the the Application.OpenDocumentFile is only loading one file?


#3

Thanks for your quick response.

No Dynamo seems to load the groups (i see revit upgrading the groups), but they don’t appear in my browser organisation under Groups/models.

Maybe you could help me out here.

Greetings,

Jesse


#4

Afaik the Load As Group command is not exposed in the Revit API. One thing you could try:

  • Load the file via background open
  • Group all elements in that file
  • Copy the group instance to your target file

All of these commands are exposed in the API and I’m pretty sure they are available as custom nodes in one package or other. If you had one Revit file that already contained all the groups you need, the process would be even easier.


Import Model Groups by List
#5

@j.heijtink

I made a script that does copy a croup from one document to another hopefully this will help you.
I did not find a custom node to do this so I used a python script. You can download the files below. If you have another version of dynamo there is a txt file with the python code.

This is the workflow

The file with the group inside it

A new Revit project with no groups

After I run the script the group form the mainfile is now in the new project file.

If you have any questions feel free to ask.

jheijtink.dyn (11.4 KB)
jheijtink.rvt (336 KB)
PythonScript.txt (1.1 KB)


#6

It only look me 19 hours.
But if that’s not it, I don’t know. there are people who are a lot better when it comes to those subjects.


#7

@j.heijtink

I downloaded your script, thanks for that but unfortunately the python script doesn’t work
Do you have any idea how it is possible?