Announcement

Collapse
No announcement yet.

Rudimentary concepts (different length lists) still elude me.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Rudimentary concepts (different length lists) still elude me.

    I don't give Dynamo nearly enough time these days (doesn't help not having my main rig setup at home) so I come begging on bended knees...

    This really can't be too difficult to achieve, but my Google-Fu returns so many threads (most far more complicated endeavours) that throw a host of nodes into consideration, but I can't parse them for which is "best" (read most expedient).

    Click image for larger version

Name:	Capture.png
Views:	1
Size:	242.1 KB
ID:	418726

    It should be patently obvious - but essentially, I'm pulling parameters from (many) sheets and wish to concatenate them with (singular) project information parameters. After switching the set-name node to longest-lacing I got closer than previous attempts, but it still only pulls the first sheet's values into the concatenation (so all sheets' <Sheet Reference> ends up the same) :banghead:




    .dyn attached, but it's heavily dependant on custom SPs so probably no use to you.
    Attached Files
    Last edited by snowyweston; March 13, 2018, 02:10 PM.

    #2
    I'm not at my computer right now, but I would try string.concat instead of the code block. Then you have a node to set to longest lacing.

    Sent from my Phablet. Please excuse typos... and bad ideas.

    Aaron Maller
    Director
    Parallax Team, Inc.
    Aaron "selfish AND petulant" Maller |P A R A L L A X T E A M | Practice Technology Implementation
    @Web | @Twitter | @LinkedIn | @Email

    Comment


      #3
      Gotcha!

      Click image for larger version

Name:	Capture2.JPG
Views:	1
Size:	52.9 KB
ID:	395899
      LOL

      (backs away slowly from Dynamo)

      :hide:

      Comment


        #4
        Without seeing your Model, I don't know if that's what you're expecting, or not? Are those all random values you typed in just for testing, or is it doing something weird?

        Iwould have thought the concat had to be on longest lacing...

        Sent from my Phablet. Please excuse typos... and bad ideas.

        Aaron Maller
        Director
        Parallax Team, Inc.
        Aaron "selfish AND petulant" Maller |P A R A L L A X T E A M | Practice Technology Implementation
        @Web | @Twitter | @LinkedIn | @Email

        Comment


          #5
          I forgot to set the lacing but get the same result. I might not be using the node correctly. Perhaps the difficulty (in my explaining) is that the concatenation is not "values-from-sheets"+"values-from-project", but a jumble of, so more like: project-sheet-sheet-project-sheet

          The values are all correct as-pre-populated (this is all .rte work) - but are simply powering all the values from one (parameter) source together.

          Here's it all working in a (2017) concatenated schedule field (that includes additional parameters I don't want for this exercise) - doing what it needs to do (internally within a Revit schedule) but I want (read: need) the value-whole injected into an SP for other purposes.
          Click image for larger version

Name:	concate.png
Views:	1
Size:	28.0 KB
ID:	395900

          Comment


            #6
            My I-can't-lace-so-I-brute-force method: Ensure all lists that you are feeding the code block are the same length. That way, you can lace with the default shortest and all the lists match up item-for-item. In this case, I'd use List.OfRepeatedItems on the project information (use the Count of your sheet list).
            Attached Files
            Chris Ellersick

            Comment


              #7
              Cheers Chris - but er....

              *cries*

              It's past home time. I'm going to revisit this tomorrow.

              Comment


                #8
                Turns out there's no way to solve this with only lacing:
                Post by Racel Williams on Dynamo Forum

                So the way concat or join works is that once you want to feed it uneven lists atm, to get predicable behaviour the best way is to indeed even out all your lists. The Join or Concat action after that is really straightforward.

                This question has been bugging me as well for a while, thanks for the motivation to sort it out for myself and make an example.

                Click image for larger version

Name:	Join_Concat_Example.png
Views:	1
Size:	505.8 KB
ID:	395907
                Attached Files

                Comment


                  #9
                  Originally posted by Bjorn_K View Post
                  This question has been bugging me as well for a while, thanks for the motivation to sort it out for myself and make an example.
                  And thank you for sharing!

                  (some of the other solutions I've seen have been so very convoluted I've avoided them entirely as I really haven't the chops to troubleshoot future failures and daren't depend on a misunderstood workflow)

                  Look forward to giving it a spin tomorrow! :thumbsup:

                  Comment


                    #10
                    I've used list.cycle to feed in a repeating single item, for use with nodes that don't work with lacing. And there are a bunch.

                    Sent from my Phablet. Please excuse typos... and bad ideas.

                    Aaron Maller
                    Director
                    Parallax Team, Inc.
                    Aaron "selfish AND petulant" Maller |P A R A L L A X T E A M | Practice Technology Implementation
                    @Web | @Twitter | @LinkedIn | @Email

                    Comment

                    Related Topics

                    Collapse

                    Working...
                    X