Lists matching

Hallo all,

Straight to issue. I have three lists:

  • List with different Family Types;
  • List with points at a curve;
  • List with names of Family Types in certain order.

I need to place the family types by points for wich i already have a list with points (the one named above) and i need a list of family types in the order that given in the last list (the third named above). How can i create a that last list?

Thanks for the help!

isnt it the elements you want to place, meaning something there can place the individual elements… not the types.

so you could use ‘FamilyInstance.ByPoint’

That is exactly what i meant! So on the node view space i have the node FamilyInstance.ByPoint. I just need a matching list for my points with the family instances.

Please always bring the total graph… it makes everything easier. Sometimes is the problem not where the user think it is, so having the overview always helps.

Just a hint… Zoom in on a few nodes and then use the camera (upper right corner in Dynamo). Using this method will it be possible to read your graph. For faster help will it also help providing the dynamo graph as well (.dyn file). If helping others means that you need to redo a graph by yourself… well that make a lot of us pass the issue :slight_smile:

I’m sorry but i’m not allowed by my company to show the whole script :frowning: . Besides theres nothing interesting. Its just as simply as i described. I need to replace or match 2 lists: one with family instances the other one with the names of instances in certain order. I was able to partially solve my problem with ReplaceByCondition node but it only replaces one item of the list, while i need to replace all of them in one go.

1 Like

I’m sure that anyone able to help you won’t gain a lot of know-how from seeing your entire graph.
Anyway I can suggest that you look at nodes like List.SortByKey, SortByFunction and AllIndicesOf.
Other than that I can’t help you without knowing what you’re trying to achieve and how.
Good luck!

2 Likes

I would really want to share but i would really like to keep my job as well. I hope you understand… Btw guys, i’m not asking about rocket science here :slight_smile:

@viktor_kuzev
I was able to extract the indices of the item in my list with order thanks to the node and your suggestion. Thanks for that!
Now i just need to apply those indices to the list of family instances and i’ll have my list. Hopefully.

It is not easy to help anyone not sharing, and if it is not rocket science why do you then need help?
Sorry but the only way this community expands and become better is by helping and sharing. I strongly doubt that a single graph from you or anyone else will be the cornerstone in any company no-one can live without. Remember that this started as a single person eager to do something and he shared… if he didnt do that you might even not have had this opportunity.

I tried however to do something… is it something like this you are looking for?
Home.dyn (67.1 KB)

There is one important thing to remember with this solution, which is the length of your element list and your point list, they need to be equal length! Next, the points needs to be sorted according to the element list.

You can tell your company if that is the policy then hire some consultants that can help you. I know of a few good ones, right here on this very forum. You can’t expect to recieve help for free if your not sharing. That is the entire point of this community. Have your company paid the package authors for the custom packages you have installed? What about all the free info your company are getting from this community? Etc etc…
company policies like that are reason enough to find other places to work, seriously.

8 Likes

@jostein_olsen
I’m a newcomer so forgive for not knowing about this issues. And i totally agree however i hope you do understand that reality of thing is unfortunately different from our wishes.

@erfajo
Thanks for the answer! I made a bit modified version of the script. Its good enough for the problem and not going to get me in problems. I hope :smiley: .
test.dyn (14.5 KB)
test.xlsx (23.4 KB)
test.rfa (332 KB)

your problem is working range…

The warning is thankfully harmless. But thanks anyway! :slight_smile: Now only to solve that marching or replacing problem…

Thank you very much Erik! :slight_smile: :slight_smile:

1 Like

subscript

This post and many other posts I recently have replied made me realize that there is a need for a node that can filter two lists by keys… I have made this node as generic as possible so it may be used as widely as possible. In this case is it Revit and Excel data that is filtered by key. The node is named “List.FilterListByKey”. Besides is there also a need for a node that load families that is overwritten and upgraded if needed. This node is named “File.LoadFamily”. Likewise is there a need for a node that gets family instances of loaded families. This node is named “DocumentFamilyInstance.ByFamilyName”. All nodes are now included in the “DanEDU Dynamo” package.

test3.dyn (18.0 KB)

3 Likes

Thats even better!

To be honest this simple kind of actions with list could be as well built-in the core… As you say the is a need of this kind of actions with lists… But this is just a suggestion :slight_smile:

Hello @erfajo Thanks so much for your awesome nodes. Your filter two lists by keys seems to be exactly what I have been looking for for a long time and was surprised that it hasn’t existed requiring me to rely on only sorting which is tough working between Revit and external data tables. Anyway, my filtered lists are coming back Null. Can you see what I might be doing wrong? I really appreciate your help!

hi @Mark_Dietrick,

thanks for your kind words :slight_smile:

this post is very old and your topic seems to be a new problem not coherent to the old thread, so please make a new post with your problem, and delete this post, then i will try to describe what I think is the problem :slight_smile:

please attach the needed files as well, the .dyn file and small samle file(s) will help if we that provides help doesnt need to reinvent the testbed.