Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

ASSIGNING ROOM FINISHES PARAMETERS THROUGH DYNAMO USING EXCEEL FILE IN REVIT

4 ANTWORTEN 4
GELÖST
Antworten
Nachricht 1 von 5
Anonymous
2517 Aufrufe, 4 Antworten

ASSIGNING ROOM FINISHES PARAMETERS THROUGH DYNAMO USING EXCEEL FILE IN REVIT

Hi everyone,

I Have tried to assign room finishes parameters to room through dynamo using excel file generated from Revit.

Two problems occurredroom finishes.PNGroom name excel.PNGroom name revit.PNG :

1. Finishes sort order getting changed from excel to revit.

2. Unable to set element parameter of Room name & number.

can anybody help me with this script?

please Smiley (traurig)

 FYI plz go through the attached images, Revit file, & Dynamo script.

 

 

4 ANTWORTEN 4
Nachricht 2 von 5
ToanDN
als Antwort auf: Anonymous

Why do you need to Set Parameter to the Room Number when they already exist?
Nachricht 3 von 5
Anonymous
als Antwort auf: ToanDN

Thank you,

That's true, My Bad.

what about the finishes order.

Like For Example : Room 101 is set have F1, C1, & W1.

values getting shuffled.

Nachricht 4 von 5
David_W_Koch
als Antwort auf: Anonymous

Perhaps you have resolved this by now.  If not, or for anyone else reading this in the future:

 

You do not show how you are getting the Rooms from the project.  You cannot assume that the list of Rooms that Dynamo obtains are sorted in ascending order by the Number property.  Most likely, they are not.  If the data being read in from Excel is in ascending order by the Room Number, then you might be able to get this to work if you sort your list of Room objects that way, provided there is Excel data for each Room in your model.

 

A more robust approach would be to determine the Number of each Room and then match it up the Excel data associated with that room number value.


David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

Nachricht 5 von 5
David_W_Koch
als Antwort auf: David_W_Koch

I am nearing the end of a LinkedIn Learning class on using Python Script nodes in Dynamo, and thought this would be a good opportunity to see if I could apply what I was supposedly learning.

 

Here is an image of the Dynamo graph I put together to accomplish this task:

1-3-2_RoomFinishValues_ExcelToRevit.png

 

 

All of the nodes are stock Dynamo nodes; nothing from any published package was used.  The two nodes at the top left get all of the Rooms in the project.  In my test file, I purposely did not create the Rooms in room-number order.

 

The five nodes at the bottom get the Excel file, converting the File Path to a File object, and then read in the contents of the Excel File, from the Finishes sheet.  The data comes into Dynamo as a list of lists, with each sublist containing the data on a row in the Excel file.  The List.RestOfItems node removes the first sublist, as that is just the column headers.  The test Excel file contents look like this:Excel_File_Content.png

 

 

It may be possible to get the Number property value of each Room in the list of Rooms generated by the top left nodes, and then match that up with the associated sublist from the Excel file using Dynamo nodes, but that task seemed better suited to a Python loop, and once I was there, it seemed easier to use Python to set the parameter values as well.  The latter part can be done with stock Dynamo nodes, in which case the Python Script would need to output a list of lists, each sublist consisting of the Room object and the finish values assigned to that Room in the Excel file.  Here is an image of the Python Script:1-3-2_RoomFinishValues_ExcelToRevit_PythonScript.png

 

I chose to output a list of the Rooms.  I rebuilt the list in the outer loop, although in hindsight I could just as easily have returned the input list.  If you wanted to set the parameters in Dynamo nodes, then the output list would be generated at the end of the if statement in the inner loop, with something like output.append([roomRvt,flr,base,wall,clng]).  The get/Set parameter lines would then be deleted.

 

The attached ZIP file contains the Dynamo graph (created in Dynamo 1.3.2), the test Excel file and two Revit 2018.3 project files.  The "01" project file is before the graph was run, and the "02" project file was after the graph was run.  Each has 12 rooms on the Level 1 Floor Plan and a Room Schedule in which you can see the effects of running the graph.RoomSchedule_AfterGraphWasRun.png

 


David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report