Donate Now Goal amount for this year: 2500 USD, Received: 1869 USD (75%)

Page 3 of 3 FirstFirst 123
Results 21 to 23 of 23
Like Tree4Likes

Thread: Can Dynamo write directly to a parameter in a nested Revit family?

  1. #21
    Member
    Join Date
    April 10, 2014
    Posts
    73
    Current Local Time
    06:29 PM
    I've made some progress with this. I will report in full when done.

  2. #22
    Forum Co-Founder Twiceroadsfool's Avatar
    Join Date
    December 7, 2010
    Location
    Dallas, TX
    Posts
    10,279
    Current Local Time
    05:29 PM
    Quote Originally Posted by Rex Wave View Post
    I've made some progress with this. I will report in full when done.
    Yeah? Do tell! I would love to know how to do it. I didn't think it was doable.

    Sent from my Pixel 3 XL using Tapatalk

  3. #23
    Member
    Join Date
    April 10, 2014
    Posts
    73
    Current Local Time
    06:29 PM
    Thanks, Bjorn and TwiceRoadsFool. In the interest of helping others as I was helped, I'm posting this reply into two threads that were helpful to me.
    It turns out, by brutal experience, that outside data can only be pushed into families by the same rules as working in Revit - the child gets the data by association from the parent. If you try to do it directly, you get the deadly "read-only" error. You pull your hair out and your wife wonders why you don't come to bed any more.
    I have a child family that is hosted in several parent families. The child has independent data, derived from the parents, and needs calculated results that I do via Excel (because I know Excel). The child gets the results from whichever parent family hosts it. The problem turned out to be that the identities of the child families don't occur in the same order as the parent families that host them. Dynamo retrieves the values from Revit in this order (the little green numbers in the list view of types which, if you click them, magically transport you to the element in Revit). Putting the data back into different families - the parents - results in the wrong data getting back to the children.
    I made a shared parameter called Sort Index in parents and child and associated it. From a schedule, I manually entered a sequence of values into Sort Index in the parents, which the child picked up, so the instances of the child shared the same sort index values as their parents.
    In my graph From Revit to Excel via Dynamo, I pulled the data from the child family, sorted it by the Sort Index (using SortByFunction as suggested by Bjorn), then sent the indexed data into Excel. ObjectIdentity is a great way to gather the threads so I don't have to reconnect a bunch if I make a change.
    In Excal, two workbooks are needed. One workbook receives the Dynamo data, which is destructive if "overwrite" is selected", blowing up the formulas that read the data if it's in the same workbook. The other worksheet reads the first and does the calculations, with several "reporting" sheets to provide the data to the respective parents. A column in Excel kept track of the Sort Index values.
    After Excel performed the calculations, my other graph, From Excel to Revit via Dynamo, pulled the data from each reporting sheet in Excel, which is already in sorted order. The instances of the parents coming out of Revit are sorted by the Sort Index, then the Excel data is pushed into each parent. For verification, the Sort Index value from Excel is pushed into another shared and associated parameter called Sort Index Check. The child gets the calculated values and the check value from its parent. I made a schedule of the Sort Index and Sort Index Check for the child family and, voila, they all line up.
    My hat goes off to the people around the world that monitor the forums and help people like me. I'm strong in my own field, but need your knowledge, freely given, to move my own efforts forward. Thank you.
    NoamRo and harrytak like this.

Page 3 of 3 FirstFirst 123

Similar Threads

  1. Depth of Nested Family for Family Type Parameter
    By GMcDowellJr in forum Architecture and General Revit Questions
    Replies: 10
    Last Post: November 18th, 2016, 04:18 PM
  2. Replies: 0
    Last Post: March 1st, 2016, 09:45 PM
  3. Nested Family with YES/NO Parameter
    By Andres Franco in forum Architecture and General Revit Questions
    Replies: 3
    Last Post: November 12th, 2015, 08:07 AM
  4. Replies: 0
    Last Post: August 31st, 2015, 02:15 AM
  5. Nested Family Parameter not working in Parent Family
    By makaz22 in forum Architecture - Family Creation
    Replies: 6
    Last Post: April 14th, 2014, 06:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •