Donate Now Goal amount for this year: 3500 USD, Received: 747 USD (21%)
Please make a donation to help us pay the hosting bill. Read more about donations in this thread. And please note that all donations are voluntary and anonymous. Thank you!

Results 1 to 7 of 7
Like Tree1Likes
  • 1 Post By damo3

Thread: Dynamo Filter, then set parameters

  1. #1
    Member
    Join Date
    May 3, 2012
    Posts
    56
    Current Local Time
    05:45 PM

    Dynamo Filter, then set parameters

    Hi All,
    Just looking for some help with 'proof of concept'. I have run into this situation 4 times in the last week and each time I have dead ended because of what I am sure is a very simple problem.

    See attached, but the concept is:
    1. We need to get a parameter value from one category, but only some of them, so this means we need to filter our selection.
    2. We need to then take these filtered values and set another value in another category.
    3. Again, the second list is also filtered.
    4. I can filter both lists, but then getting the nodes to work to SET the parameter just never works for me.


    For example, I want to take the 'Mark' value of a filtered selection of curtain walls and set this value in the 'View Names' of a filtered selection of elevation views.
    If I am doing a simple get.parameter / set.parameter I have no problems, but once I introduce the nodes to filter, I get lost.

    Thanks in advance for any tips & guidance.
    Attached Thumbnails Attached Thumbnails Dynamo Filter, then set parameters-filter-set-parameter.png   Dynamo Filter, then set parameters-filter-set-parameter.png  
    Last edited by damo3; December 13th, 2016 at 09:53 AM.

  2. #2
    Member amoursol's Avatar
    Join Date
    November 21, 2012
    Location
    London, United Kingdom
    Posts
    478
    Current Local Time
    07:45 AM
    You're currently trying to populate your SetParameterByName's --VALUE-- as an Element, rather than a string (text). You'll need to run another GetParameterValueByName node to pull what ever data you want to push.

    However, the way your script is set up, you'll be pulling random wall data, simply filtered by your Mark values, and pushing that to a list of Views. There is a chance (Unless I'm mistaken) that you may be pushing and/or pulling data to elements that don't meet your needs. But try the first bit first and we can fix the second after

  3. #3
    Member
    Join Date
    May 3, 2012
    Posts
    56
    Current Local Time
    05:45 PM
    Ok, that first part "running another GetParameterValueByName was great. I am gobsmacked I never thought of that.

    So as you predicted, I think now we are up to the second part. I have successfully filtered and output the value I want. Now setting the value I am stuck again. I don't know what to connect to 'elements' of the SetParameterByName node. When I connected the elementofType from all the beginning, it did change view names of elevations, but not to the corresponding ones I filtered, which I assume is what you meant.


    p.s. ignore the nodes in red group. I do have a question about how I can insert a separator using OTB nodes. I couldn't find one from the OTB nodes, hence the archi-lab node. But this is more to satisfy my curiosity
    Attached Thumbnails Attached Thumbnails Dynamo Filter, then set parameters-part-1-filter-set.png  

  4. #4
    Member amoursol's Avatar
    Join Date
    November 21, 2012
    Location
    London, United Kingdom
    Posts
    478
    Current Local Time
    07:45 AM
    Hello Damien,

    I've recreated your graph below and finalised what you wanted to do. Bear in mind though that this graph is a rather manual one in the sense that you're simply matching walls to views without actually matching them

    Attached Thumbnails Attached Thumbnails Dynamo Filter, then set parameters-revitforumquery.png  

  5. #5
    Member
    Join Date
    May 3, 2012
    Posts
    56
    Current Local Time
    05:45 PM
    Thanks for this, unfortunately I have been so busy I haven't had a proper chance to look at it, but will over the break and post an update then.
    It is something I need to work out because just yesterday I needed it again. Your point about matching them up also makes me think I may need to pull ID numbers, maybe, we'll see.

  6. #6
    Member
    Join Date
    May 3, 2012
    Posts
    56
    Current Local Time
    05:45 PM
    OK, finally got around to looking at this on a wet/humid day. Nicer inside under the a/c!
    So to complete this thread, I have posted below my final graph, which is just as you have constructed armoursol, just longer with watch nodes

    Yes, I do now understand what you mean by "this graph is a rather manual one in the sense that you're simply matching walls to views without actually matching them". When I checked the data, the filter worked, selected view names all renamed fine, but when I went around and checked walls, I realised my curtain wall mark numbers didn't match the view name that was looking at them, simply because Dynamo sorts the wall list by the element ID number, which is somewhat randomly assigned so I would have to work with element ID's... and another rabbit hole presents itself (which I won't be diving into).

    So, whilst for this example it isn't the perfect solution, the concept which is really what I was after, will prove valuable. Lots of lessons learnt, can't thank you enough for assisting me on this little project. much appreciated Armoursol.



    p.s. In my graph I have used the 'String From List' node from the Archi-lab package. When I used the OTB String.Join node, the list value would display correctly in the watch node, but dynamo would only set the value of the last index item. No idea why, perhaps I misused it, but incase anyone else has the similar problem thought it was worth a mention.
    Attached Thumbnails Attached Thumbnails Dynamo Filter, then set parameters-set-get_filtered_final.png  
    amoursol likes this.

  7. #7
    Member amoursol's Avatar
    Join Date
    November 21, 2012
    Location
    London, United Kingdom
    Posts
    478
    Current Local Time
    07:45 AM
    You could also look into the Springs node 'Springs.Collector.ElementsInView in order to pair up the walls with the view (Caveat: May not work if you can't see the aforementioned walls within the bounding box of said view).

Similar Threads

  1. Replies: 1
    Last Post: August 30th, 2016, 04:00 PM
  2. Replies: 0
    Last Post: August 27th, 2015, 12:15 AM
  3. Replies: 0
    Last Post: November 19th, 2014, 12:45 PM
  4. Replies: 0
    Last Post: July 28th, 2014, 08:15 PM
  5. Replies: 0
    Last Post: November 18th, 2013, 11:45 AM

Posting Permissions

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