Donate Now Goal amount for this year: 2500 USD, Received: 1627 USD (65%)

Page 1 of 3 123 LastLast
Results 1 to 10 of 23
Like Tree4Likes

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

  1. #1
    Member
    Join Date
    April 10, 2014
    Posts
    73
    Current Local Time
    02:38 PM

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

    Good morning!
    I have families that incorporate a common nested family. In Revit, to write a value to a parameter in the nested family, I have to associate that parameter to a parameter in the host, then enter the value in the host parameter. In other words, I have to write the data indirectly. With Dynamo, can I write the value directly to the nested parameter? I expect that I would have to disassociate the parameter from the host to do this, if it can be done at all.
    Thanks!

  2. #2
    Forum Co-Founder Twiceroadsfool's Avatar
    Join Date
    December 7, 2010
    Location
    Dallas, TX
    Posts
    10,117
    Current Local Time
    01:38 PM
    You can write it directly to a parameter in a SHARED nested family, yes. But it cannot be associated to the parent families parameter, if you want to do it.

    Unshared, no.

    Sent from my Pixel 3 XL using Tapatalk

  3. #3
    Member
    Join Date
    April 10, 2014
    Posts
    73
    Current Local Time
    02:38 PM
    Shared and unassociated, I get, "Element.SetParameterByName operation failed. The parameter is read-only."
    The output of the node is the right number of instances of the family but all null.
    Last edited by Rex Wave; March 5th, 2019 at 07:45 PM.

  4. #4
    Forum Addict elton williams's Avatar
    Join Date
    December 7, 2010
    Location
    Gold Coast
    Posts
    2,608
    Current Local Time
    04:38 AM
    Quote Originally Posted by Rex Wave View Post
    Shared and unassociated, I get, "Element.SetParameterByName operation failed. The parameter is read-only."
    The output of the node is the right number of instances of the family but all null.
    You might get better help if you share your script and revit files or at least some nice clear images of them.

  5. #5
    Member
    Join Date
    April 10, 2014
    Posts
    73
    Current Local Time
    02:38 PM
    Attached Thumbnails Attached Thumbnails Can Dynamo write directly to a parameter in a nested Revit family?-dynamo-read-only-fail.jpg   Can Dynamo write directly to a parameter in a nested Revit family?-dcc-device-box-r18-w-thru-qtys.jpg  

  6. #6
    jmk
    jmk is offline
    Forum Addict jmk's Avatar
    Join Date
    December 31, 2012
    Location
    NM, USA
    Posts
    1,419
    Current Local Time
    12:38 PM
    Are you trying to set this in the project or in the family? Assuming you are in the project, I'd start by making sure the element id is for the nested, shared, child family (not the host family). Clockwork has a good node to get the nested subcomponents. Also, make sure your parameter name is a string. At least for testing I'd write it in a code block or string node.

    It might be best to post the script and a working file. How are you getting those parameter names/values. They may not be consistent throughout the list.

  7. #7
    Member
    Join Date
    April 10, 2014
    Posts
    73
    Current Local Time
    02:38 PM
    Funny you should ask. I was going to edit the post of pictorials.
    This is set in the project (if you mean where does it launch from). The element is for the nested, shared child family. The parameter names are strings - the data headers from the incoming data so I don't get mixed up. Here's where the data comes from:

    The Revit file is big (aren't they all). I guess I can chop it down to a couple of instances. Let me work on that.
    Thanks.
    Attached Thumbnails Attached Thumbnails Can Dynamo write directly to a parameter in a nested Revit family?-dynamo-read-only-fail-inputs.jpg  

  8. #8
    Member
    Join Date
    April 10, 2014
    Posts
    73
    Current Local Time
    02:38 PM
    There are a dozen output boxes Element.SetParameterByName. They all fail. In my ignorance, I tried eliminating the List.Transpose node. Curiously, I no longer got the Read-Only fail, I got parameter type mismatch, which is reasonable, but it suggests that the data was getting to the family and being rejected for format reasons...

  9. #9
    jmk
    jmk is offline
    Forum Addict jmk's Avatar
    Join Date
    December 31, 2012
    Location
    NM, USA
    Posts
    1,419
    Current Local Time
    12:38 PM
    So you don't care what the host family is, and aren't using any of its data to inform the information you are writing to the nested shared families? With the data coming from excel, you might need to use an object->string node, depending how dynamo sees the data.

    When I write scripts I start by making sure the concept is sound, and help identify where things are failing, by working on a single instance. I'd use an "Element select" node, write the name of the parameter in Dynamo, and give it a value from dynamo. If that works (which for a nested shared parameter it should) then you can work backwards.

    One more thing to check - is this an instance or a type parameter? What I can see of the script looks right for instance parameters, but type parameters need an extra step to access.

  10. #10
    Member
    Join Date
    April 10, 2014
    Posts
    73
    Current Local Time
    02:38 PM
    There are four host families. Yes, it passes info to the nested family, to different parameters than I'm trying to address here. I've tried the string conversion and back again (you can se a bit of that in the entry area) to fix previous problems with type mismatch. I will try simplifying to one node and use explicit strings. This is an instance parameter. For futire refence, I'm interested int eh extra steps you mention.
    Thanks for your assistance. I'll let you know...

Page 1 of 3 123 LastLast

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
  •