Results 1 to 5 of 5

Thread: Group by X, sort by Y, sort by Z, run counts, return values...

  1. #1
    Moderator snowyweston's Avatar
    Join Date
    December 21, 2010
    Location
    C.LONDON
    Posts
    4,435
    Current Local Time
    05:01 AM

    Not allowed! Not allowed!

    Group by X, sort by Y, sort by Z, run counts, return values...

    Evening all!

    So once again I find myself dabbling with Dynamo, and mildly concussed from banging my head against a wall... yep, for those who may have been following "Snowy's adventures in graphical programming" this less-than-intrepid fairweather explorer of the realms of nodes finds lists and such to be quite the obstacle.

    Attached are graph and screenshot, and the concept is nothing new.... but efforts to align solutions to alike propositions posted elsewhere to my own scenario have so far proved fruitless, so I creep back here to seek some education.

    Essentially, we build our windows in curtain panels. Don't ask, we have our reasons - and it really works for us. Or at least, until the point someone isn't content with a "style" being modelled to all sizes, tagged as one type (type mark) and then it's dimensional variants scheduled. No, the challenge has been raised, how do we call out the (instance) size variants, so that, identical compostion or not, we can say (and tag and schedule) window w1*h1=WA1, and window w2*h1=WA2 (or some other such coding taxonmy)

    Cue, "aha! I'll merely fetch the width & height values and concatenate them into a new custom instance SP along with the Type Mark!" but alas no - we've been doing that merrily for years, but this won't fly with the estimators on this particular project. Apparently.

    So I (we) need:

    W.A(1a)
    W.A(1b)
    W.A(2a)
    W.B(1a)
    W.B(1b)

    where:
    Type:
    >W. = Window (obviously)
    >>A & B = distinct arrangements of the panes and stuff within the window, (the "style" if you will)
    >>>1 & 2 = width variants (derived by instances)
    >>>>a & b = height variants (derived by instances)


    Thing is, 9as per my notes on the .dyn) whilst I've worked out how sequence-count the number of unique instances of sizes per window (type mark) I've reached my regular brainblock at how to recycle that output back to the actual elements now that I've drilled down, sorted and made uneven, the value lists. I tried dictionaires, I really did, and I've plugged away at different lacings and level depths - but every time I get close I only end up going off on some crazy tangent that breaks everything and takes me further from the solution I'm seeking.


    I'd really appreciate some help if anyone can spare some.


    PS: my script, as ever, is based entirely around our custom SPs so won't return any results for you - I've provided it merely for "look how confused I am" laugh.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	KP_CWP_Reference-Generator.png 
Views:	22 
Size:	756.8 KB 
ID:	38179  
    Attached Files Attached Files

  2.    #2
    Member
    Join Date
    December 11, 2010
    Location
    Astana
    Posts
    194
    Current Local Time
    11:01 AM

    Not allowed! Not allowed!
    Hi,
    Did you find a solution to the problem?

  3.    #3
    Member Bjorn_K's Avatar
    Join Date
    April 8, 2011
    Location
    Rotterdam, Netherlands
    Posts
    356
    Current Local Time
    06:01 AM

    Not allowed! Not allowed!
    Hi Snowy,

    Just saw this, been busy for a while.

    Smarter people than me can probably do this more efficiently but I've used your own code as a way of "storing" my progress during the script.

    I think you've made it hard on yourself by grouping both W&H at the same time.

    This is how I solved it.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Sorting_done.png 
Views:	8 
Size:	60.7 KB 
ID:	38333   Click image for larger version. 

Name:	Sorting_Exercise.png 
Views:	15 
Size:	746.1 KB 
ID:	38334  
    Attached Files Attached Files

  4.    #4
    Moderator snowyweston's Avatar
    Join Date
    December 21, 2010
    Location
    C.LONDON
    Posts
    4,435
    Current Local Time
    05:01 AM

    Not allowed! Not allowed!
    Quote Originally Posted by Nurlan View Post
    Hi,
    Did you find a solution to the problem?
    Yes, yes I did - but forgot to post back.

    I toiled and it's terribly inelegant, but will fish it out - and share when I'm next near the files.

    I'll also be checking out your effort Bjorn to see if your method catches/considers anything I missed.

  5.    #5
    Moderator snowyweston's Avatar
    Join Date
    December 21, 2010
    Location
    C.LONDON
    Posts
    4,435
    Current Local Time
    05:01 AM

    1 Not allowed! Not allowed!
    ...so, here was/is my effort.

    data-wise, it does all that I need - I get our <Assembly Reference> SP concatenated from the <Width Variant> & <Height Variant> codes* generated automatically - all nicely size-ordered (smallest = 1...etc)


    But next plan/want = is to colour-them-in, codified like, A=red, and then shades of, B=blue, then shades of, etc....




    *the (example) letter-based codes for <Type Mark> & <Width Variant> will break past the 26th letter, and given the complications in our work - that might need rethink.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	elev.PNG 
Views:	10 
Size:	57.2 KB 
ID:	38370   Click image for larger version. 

Name:	schedule.PNG 
Views:	8 
Size:	33.7 KB 
ID:	38371  
    Attached Files Attached Files

Similar Threads

  1. Now you see me, now you sort of do.
    By biff in forum Architecture and General Revit Questions
    Replies: 4
    Last Post: October 7th, 2019, 10:54 PM
  2. Replies: 0
    Last Post: February 22nd, 2016, 08:45 AM
  3. Sheets won't sort in order
    By mmarshall in forum Architecture and General Revit Questions
    Replies: 12
    Last Post: April 25th, 2014, 11:56 PM
  4. Filter/Sort per level.
    By clark.kent21 in forum MEP - General
    Replies: 2
    Last Post: November 15th, 2011, 05:15 PM
  5. Parameter Group sort order and usage
    By Gordon Price in forum Architecture - Family Creation
    Replies: 3
    Last Post: November 13th, 2011, 10:49 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
  •