Hi everyone. Today I’ll continue finishing the second part of assigning unique tags to all piles on my Revit structural model and for those of you who missed the first part, here is the link:
We ended up with this node arrangement where I extracted the XYZ coordinates of each pile then filter the X and Y coordinates separately and finally create a sorted list of piles in ascending order with respect to X or Y coordinates.
Next, I set up my spreadsheet listing down in columns what I might need to export using Dynamo from my Revit model.
With that in mind, I started adding those nodes as additional information to be taken out of my sorted pile elements.
Then I’ll list them down in a list.
Convert the columns into rows.
Then time for me to build my export to excel node and connect the transposed list.
Hi “Run” and I will have something like this:
Now I can sort column “Y-COORDINATE” and “X-COORDINATE” in ascending order.
And the result is:
As you can see, I don’t have a problem with arranging the Y-COORDINATE in ascending order but, for whatever reason, Excel did not sort the X-COORDINATE in ascending order. Still looks random to me the highlighted cells and therefore I need to fix the arrangement first before applying “PILE REFERENCE” information.
Here is how it will look like after fixing the sorting arrangement with “PILE REFERENCE”.
And I am done with first part of exporting the information. Next step is to import back those “PILE REFERENCE” information using read from excel file node in Dynamo.
Before jumping back to Dynamo, I need to do one more step on my excel file by sorting the “PILE ID NUMBER” in ascending order.
Then jump to Dynamo and I’ll start by setting up the nodes to read the excel file then hit “Run”.
Next I’ll remove the list that contains my column titles.
Convert the columns into rows.
Then I’ll isolate the “PILE REFERENCE” and “PILE ID NUMBER”.
Then add the node to specify the element parameter to use where the “PILE REFERENCE” information will be written.
After that I need to specify which elements to connect to the “element” input of my “Element.SetParameterByName” node.
Basically I need to repeat those nodes in isolating the “PILE” from my structural category. Here are the nodes needed.
By examining the list result, the list is now arranged in ascending order which matches with our excel file.
Now I am ready to connect the “in” output of my “List.FilterByBoolMask” node to my “element” input of my “Element.SetParameterByName” node.
My script is now done and I am ready to hit “Run”.
Now it’s your turn to give it a try and if you have any other information to add to improve the process, please share. I am happy to learn from you. My door is open to find out your Python script or any other processes to remove the process of editing manually, by sorting, the spreadsheet as this will likely cause a human error.
Once again, this process does not include any Python node which requires programming knowledge. Not everyone is knowledgeable in programming language and this is the reason for me to demonstrate that it can be done using the basic Dynamo nodes.
Yesterday I organized a knowledge sharing session where our Revit Leader introduces us to the additional features of Revit Apps called “IdeateApps for Revit” and one of its feature is being able to renumber most elements by selection, path, or auto-update method. Once I get the chance to test this for piles, I’ll share to you my experience and how it works.
I hope you like it and until next time.
Have a great weekend!