Family Instance to Host to Family in Linked Model

This definition works if the element is in the current model but when I use it on a linked model it not only crashes Dynamo but Revit. Thoughts?



After reading several other posts about similar attempts to access elements in the linked model I’m more confused than ever about why it’s crashing. Sounds like it should be working…

Hi @Greg_McDowell

Try connecting one by one node and Run your graph on Manual mode. This way you can know which node is culprit :slight_smile:

Good advice! Turns out it’s the last mode. Being built-in I can’t check on the underlying code (or, rather,I could but that’s way more raw programming than I, ready for or would understand… C+, yes?) to see what might be going on.

Try using “FamilyInstanceByFacePoints” from spring nodes package.

Thanks. Worth a shot but it still crashes Revit. Here are the DYN and RVT files if it helps.

BTW… whoever is managing Spring Nodes might look to fix that spelling error… whoops!

Any other thoughts on this or should I put it to bed for now?

@Greg_McDowell don’t put it to bed :slight_smile: . I will try to fix it for you in about 9-10 hours from now.

Looking forward to it! Thanks much!!

Hi @Greg_McDowell

Guess what i fixed it for you. Try this script MEP TEST(For Greg).dyn (27.3 KB)

And here is GIF in Action.

1 Like

Thanks for your efforts and your help.

It’s not quite what I’m looking for as this definition creates an Imported Instance to host the family and I’d like to host the family to the fixture in the linked model directly so that, when the fixture moved in the base file, the hosted family moves with it in the linked file. I can do this manually, but if I’m going to convince my engineers to try the workflow I’m going to need to come up with a better solution than placing them one-by-one.

The idea came from this post over at RFo –

Maybe I’m asking for too much of an easy button!

Hi Gregg,

This was not your query at the beginning.

You original query was [quote=“Greg_McDowell, post:1, topic:6605”]
This definition works if the element is in the current model but when I use it on a linked model it not only crashes Dynamo but Revit. Thoughts?

Coming back to your recent query. Yes it is possible to host the family to the fixture in the linked model directly.

What can I say, language is imperfect! My first attempt went down the imported instance route as well. The version that worked in my original did place the family on the light fixture as I intended. But when I fed it the linked fixture instead, it crashed. Sorry if I wasn’t more clear.

Greg McDowell Jr

At first when i tried your script it use to get crash for me as well but after the modification of script, its working fine as shown on gif. The DYN script which i attached above looks good.

Yes, it does place the family but it does not host it to the family in the linked model. It hosts to an “imported instance” that the script makes. The goal is to host the family in the linked model to the family in the base so that when the family in the base file moves it moves the family in the link model.

I’m going to make a Screencast of the workflow to help explain. BRB

And back… hope this helps explain what I’m after –

Hi @Greg_McDowell

In that case. There many ways to solve this. I have 2 options for you.

Option-1 - Create 2 scripts. First script will create family in the base which is hosted to the family in the linked model and remove the “Imported Instances” that was hosted and finally stores “ElementID” in excel file to move the elements.

Second script will read the ID’s of the elements and then use “SpringsElement.SetLocation” node to move the location of the families according to the host of the linked model family.

Option-2 - Use “Springs.Collector.LinkedInstanceElements” to refresh True/False Boolean to Get locations of family from linked model and set the modified location.

And here is GIF in action:

The choice is yours :wink:
Good Luck!


Thanks, Kulkul! Appreciate the help.

Great work @Kulkul !
Just a question regarding Option2:
Is there absolutely no way to feed in FamilyInstance.ByFace (or its Springs’ counterpart) the effective linked face instead of the temporary imported one?

Hi @GregX

I tried it but it doesn’t work without imported. It was keep crashing. It might be possible without the temporary imported also. Needs some Python magic here :wink: I will get back to you later currently on Flight :slight_smile: going on holidays.

1 Like