Changing the current document (looping through multiple)

Hi All,

I know it was covered in AEC tech, but @ehsan, can you just outline the best way to choose the current document that we are pointing out components toward- in particular- towards families.

Additionally, lets just say I want to batch add a series of parameters to multiple families (the same shared parameter) - is it possible to automate a cycling through of the active document etc.

A workflow could be

  1. Creating a series of shared parameters within a revit file from an excel file (pass in name and eg. length)

  2. Batch pass the excel into a family and futher, multiple families (some sort of loop etc)

  3. Batch pass in data to all of these parameters across all of the familes (or even better formulas)

  4. The holy grail to be able to place reference lines based on lines drawn in rhino (where I can then hook up dimension lines- I know this is a step too far).

Is this possible?

Sam

1 Like

A further extension to this- lets say I have 10 families, who all have the same shared parameter (refer to the attached image).

I then want to edit this formula for all families, is that possible in a one hit within rhino inside?

To essentially get into the family, make the change, save it and automatically reload it back into the project (I know we may have issues with load time).

Thankyou, Sam

If the Doc is an available input you need to zoom in and Add by hitting the +

Dimensioning nodes are a requested feature not yet available.

The ‘Parameter Formula’ component works on any parameter that supports formulas (Global or Family).

Document Filter Cluster

This definition needs you open manually the family files you want to update, you can do several changes or just check on the Revit UI is doing what you like, and then press on the Trigger up-right in the canvas to save all the families to disk.

2 Likes

Hi @kike

That looks really good, the saving item is nice.

Can you please explain more about the trigger, and I imagine once you run this, you still need to go into all the open families and load them back into the project and overide settings, you cant automate that push and then automate the closure of the files?

This is very good though.

Sam

Hi @kike

How do I open up the document file node so I can pass an element into it? like you have done.

Zoom in

cycle through families and save.gh (10.8 KB)

1 Like

@Japhy

thanks for all your quick responses.

One issue I am having us- when I make exactly the same parameter, it comes in as a shared parameter within the project file, but within the family file, it comes in as a revit family parameter.

How can I get the family to use the same shared parameter, so I can schedule out information within the project using the same shared parm across families?

Sam

You’ve creating two separate parameters.

You can add a parameter to the project, export it to your shared parameter file then associate with the family by adding it as a shared parameter manually. The parameters will then have the same ID and be truly shared. A shared parameter is the unique ID, not it’s name.

Ok,

I cant seem to see how you would export the project parameter to the shared parameter txt file?

Once in the family, that process of adding the shared parameter would have to be manual? you cant automate that?

Thankyou! this is really great stuff!

Go into Project Parameters, Modify and you will see the Export under the Shared Parameter.

Once the Shared Parameter is created its available here

1 Like

Perfect and I am guessing you dont get a choice about what Group within the text file to add it to? it looks like exported parameters is the only option.

Secondly, there is no way of automating the process of adding the shared parameter from the text file within the revit environment, these needs to be a manual process?

Thirdly, the example about shows how you can edit parameter formulas within the family, but is it possible to set parameter values within the family itself, or it seems to me you can only set parameter values of families within the project environment?

Thankyou for your patience.

Sam

If you have the shared parameter established you can add to Docs as a project parameter. I hesitate to say ‘Automated’ but close if things are standardized in your projects.

Yes, Those are Family Type Parameters and can be easily set in the Project.

Maybe in the Family (need to get type in the family doc, will get back to you on this one)

Edit: New Component needed to access Family Types in a Family Document.

Point 1- Perfect

Point 2- So I have the shared parameter made in the project file- but when I am in the family itself- are you saying I should just make a project parameter with the same name or is there a way to actually use the shared parameter itself? I am a bit confused by this one.

Point 3- Ok- that would be amazing if you could look into this- it would be really nice to be able to set values within the family, as opposed to just in the project file space. Additionally, what component allows us to get the ‘family’ element itself? I can get the family type and then find the name of the host family- but I want to be able to get the actual family symbol itself?

Edit- I know there is the Query Families but that just returns text, there is also the component family picker, but is there any component that simply lists all families in project or by category etc?

no. The Shared Parameter is always going to be in its external .txt file. That file holds its unique ID and it will add it to whatever document you specify.

You are going to need to be more specific, there may be some mixing of terminology going on.

In which Environment? the Project Doc or Family Doc?

‘family’ element itself? The geometry or the Element ID of the family?

Name of the Host Family? Like a family hosted on a wall?
image

when you say family Symbol are you talking about nested symbols? (like grid head)

Query Types gets you all the familys & their types. So you can use the Query Families to narrow it down, or the new Filter Family component.

The answers above are perfect @Japhy

You mentioned before about the bindings are not booleans.

If I have a long tree to of data to create parameters, I may want some as type, some as instance etc. Given that I can not using the value picker within the component, is there a way of getting each of the three options where I can select the right one based on a tree data value- or is this perhaps something where I need to write a little python script?

Thanks!