Results 1 to 8 of 8
Like Tree6Likes
  • 3 Post By Twiceroadsfool
  • 3 Post By snowyweston

Thread: My Very First (attempt at a production) Dynamo Graph (please, laugh away!)

  1. #1
    Moderator snowyweston's Avatar
    Join Date
    December 21, 2010
    Location
    C.LONDON
    Posts
    3,866
    Current Local Time
    01:08 PM

    My Very First (attempt at a production) Dynamo Graph (please, laugh away!)

    I don't 'do' New Year resolutions... but I have said to myself I need to get my head around Dynamo, so here I am!


    I thought I'd start with something simple, but alas... (Revit) Type parameters. I'm stumped at first hurdle. Working with (element) Instance parameters seems to be handled OOTB - but 'getting at' - or more specifically 'filter by' (type parameters) seems, by my current "understanding" a bit round-the-houses.

    At least not without custom packages. And, much like (Revit) addins, I'm of the (masochistic) mind to try and make things work OOTB before reaching for magic buttons - simply because I want to keep the worry of deploying a consistent Dynamo to my users to a separate question...


    So what is that I am actually trying to do?

    Well, all of my families differentiate themselves between being an "Assembly" or a "Component" - in so much the highest level parent family of say a door (or more accurately a doorset) is the "Assembly", and all "child" parts, (i.e. frame, panel, ironmongery,etc) are (shared) "Components". This is all handled by a Y/N selector for both, and a third parameter <Model Hierarchy> that returns a respective text value thanks to an IF I have in every family.

    Still with me? Hope so.

    Right, so I go to Dynamo, and want to do a concatenate trick (might as well start simple here) with some (instance) parameters to automate-populate the <Mark> field.

    Simples, a bit of copification (I've done this already with rooms & areas) pretty much gets me where I want to be....

    My Very First (attempt at a production) Dynamo Graph (please, laugh away!)-concate.png

    Until I realise/notice/despair that I'm collecting EVERY instance of EVERY door family.

    In a test scene with only 36No. "Assembly" door(sets), that translates to 774 (door family) instances.
    I've projects I want to push this out on that have 3000+ "Assembly" door(sets). The maths frightens me (& my computer). Not to mention, the "children" families don't have the instance parameters populated, and concatenating them will generate duplicate mark errors - which is one of the exact reasons why I'm tackling this.


    So, obviously, I want to filter the (list of) elements before plugging into the Element.SetParameterByName

    To Google! And a whole load of threads, many similar, but not quite close enough.

    I've found the nodes, and steps that can get me an element's family, and in turn, parameters from that family (that itself 54213 list items alone from this 36No. door test!!!!) and w/ a basic understanding of the Boolean node (not quite ready for the shorthand IFs of Dynamo's Code Blocks) I've ended up with a (filtered) list - of the 36 doors I do wish to process - but plugging that output into with the concatenating part throws the wob:

    My Very First (attempt at a production) Dynamo Graph (please, laugh away!)-concate4.png

    ...and I get despondent.


    Here's the whole thing:
    My Very First (attempt at a production) Dynamo Graph (please, laugh away!)-capture.png

    How do I rally round the filtered to the function?

    Have I got about this the wrong/right way round?


    As before, I would prefer OOTB-leaning answers, but if there is a magic button out there, I could be persuaded.


    *my door families are, how would one say, a tad involved.

  2. #2
    Moderator snowyweston's Avatar
    Join Date
    December 21, 2010
    Location
    C.LONDON
    Posts
    3,866
    Current Local Time
    01:08 PM
    Sorry, that saved graph image hasn't shown any of the node labels for some reason.

  3. #3
    Forum Co-Founder Twiceroadsfool's Avatar
    Join Date
    December 7, 2010
    Location
    Dallas, TX
    Posts
    8,339
    Current Local Time
    07:08 AM
    You need to zoom in (in Dynamo) until the text shows up, before exporting the graph as an image.

  4. #4
    jmk
    jmk is offline
    Forum Addict jmk's Avatar
    Join Date
    December 31, 2012
    Location
    NM, USA
    Posts
    1,279
    Current Local Time
    06:08 AM
    Based off what I can see you need to feed the filtered door list into each "get value" instead of the original list (if you need info from the components you need to tie it back to that main assembly element id to make sure you get the right info). Also use the filtered list in the set parameter. I've only used the set parameter a couple of times. I suspect its failing either because the count for the element list differs from the other list, or because its one of those nodes that needs to be run through list.map to do it to every one.

    Also use watch nodes or pin the result to see what you are getting - that concentrate list may need to be flattened to a one dimensional list.

  5. #5
    Moderator snowyweston's Avatar
    Join Date
    December 21, 2010
    Location
    C.LONDON
    Posts
    3,866
    Current Local Time
    01:08 PM
    Right, a better capture, with some re-work* on nodes. But still no cigar. Not even close I imagine.

    My Very First (attempt at a production) Dynamo Graph (please, laugh away!)-capture.png
    *said changes being:
    a move to filter <Family Name> by "_A_" (our family-naming standard that also demarks "Assembly")
    connecting the filtered-output to the concatenating nodes as per JMK's suggestion

    But the error on the Element.SetParameterByName node now complains
    My Very First (attempt at a production) Dynamo Graph (please, laugh away!)-error.png
    because - I suspect - the list being fed into it is now looking at my (filtered) types, not the instances of said (filtered) types.

    So essentially I've gone full circle!!!


    Q. How might one "relate" the results of the filtered types list to "get at" (and list) the instances?




    I seriously could have flipped this fifty times over already with Excel.

  6. #6
    jmk
    jmk is offline
    Forum Addict jmk's Avatar
    Join Date
    December 31, 2012
    Location
    NM, USA
    Posts
    1,279
    Current Local Time
    06:08 AM
    You are correct in why it isn't working. Double check that you are getting the same numbers in each list, but you should be filtering the output of "All elements of category" through the the string contains Boolean list, not the families.
    Last edited by jmk; January 12th, 2017 at 04:05 PM. Reason: families, not family types

  7. #7
    Forum Addict josephpeel's Avatar
    Join Date
    May 3, 2012
    Posts
    1,189
    Current Local Time
    02:08 PM
    Im pretty sure you can get Type Name or Family from the instances too. So use Get Parameter By Name to get the list of type names from the instances directly, then use that to filter the list of instances. Finally set the parameters in all the instances.

    I agree it takes much longer to program solutions to most problems than to just do it manually. So the real benefit comes with either tasks that are so time consuming/repetetive that they are impossible or for tasks that you will repeat again and again by multiple projects.

    So I started with sheet and view handling and useful tools like 'Find Replace' for text and object names. Basic stuff that saves you time.

  8. #8
    Moderator snowyweston's Avatar
    Join Date
    December 21, 2010
    Location
    C.LONDON
    Posts
    3,866
    Current Local Time
    01:08 PM
    Thanks for your assistance everyone - the answer (with a working re-worked .dyn) got posted last night over on Dynamobim:

    https://forum.dynamobim.com/t/my-fir...instances/8833

    Processed 1865 doors in 50 seconds. Nice.

Similar Threads

  1. My Very First Dynamo Graph (no laughing...)
    By Twiceroadsfool in forum Dynamo BIM
    Replies: 7
    Last Post: January 11th, 2017, 02:06 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
  •