Page 1 of 2 12 LastLast
Results 1 to 10 of 12
Like Tree10Likes

Thread: Ive created a read from Revit to Excel.. but

  1.    #1
    Senior Member
    Join Date
    November 27, 2012
    Posts
    572
    Current Local Time
    09:14 PM

    Ive created a read from Revit to Excel.. but

    Here is the Dynamo ive created to read info from a revit schedule to excel. but how do I change it round to put the info back into a revit schedule.

    Cheers
    Attached Thumbnails Attached Thumbnails Ive created a read from Revit to Excel.. but-capture.png  

  2.    #2
    Junior Member
    Join Date
    November 17, 2011
    Posts
    34
    Current Local Time
    04:14 PM
    Hi Nick,

    It really depends on what data you are trying to "put back" into the Revit schedule. In general, Revit Schedules are created automatically from the parameters of the scheduled elements. Therefore, what you are doing when you are trying to "write" data from Excel into a Revit schedule is actually modifying the element parameters.
    It's not clear to me from the picture of your posted Dynamo script exactly what data you are reading.

    Some data (element parameters) cannot be changed in the schedule- for example, if you are scheduling rectangular columns, and the width and depth are type parameters, you would not be able to change those scheduled values- they are driven by the type. Other scheduled data is read-only (like element IDs).

    So, without knowing exactly what you are trying to accomplish, it's hard to answer your question. In general, though, when you are bringing changed data back from Excel to Revit, you will need to read the value from Excel, associate it with the correct element in Revit, and then use a node such as "Element.SetParameterByName" to "write" that data into Revit.

    It's not as easy as clicking in the schedule cell in Revit and typing in a new value. There's a lot of data sorting that you'll have to manage through Dynamo once you "read" the updated/changed Excel data.

    With all that said, there are many, many examples of writing Excel data to Revit using Dynamo out there on the web- group discussions, videos, how-to posts in blogs. I'd start by searching the Dynamo forums: https://forum.dynamobim.com

    Good luck!
    Joe
    Last edited by Joe_Charpentier; September 11th, 2018 at 01:16 PM.

  3.    #3
    Senior Member
    Join Date
    November 27, 2012
    Posts
    572
    Current Local Time
    09:14 PM
    Quote Originally Posted by Joe_Charpentier View Post
    Hi Nick,

    It really depends on what data you are trying to "put back" into the Revit schedule. In general, Revit Schedules are created automatically from the parameters of the scheduled elements. It's not clear to me from the picture of your posted Dynamo script exactly what data you are reading.

    Some data (element parameters) cannot be changed in the schedule- for example, if you are scheduling rectangular columns, and the width and depth are type parameters, you would not be able to change those scheduled values- they are driven by the type. Other scheduled data is read-only (like element IDs).

    So, without knowing exactly what you are trying to accomplish, it's hard to answer your question. In general, though, when you are bringing changed data back from Excel to Revit, you will need to read the value from Excel, associate it with the correct element in Revit, and then use a node such as "Element.SetParameterByName" to "write" that data into Revit.

    It's not as easy as clicking in the schedule cell in Revit and typing in a new value. There's a lot of data sorting that you'll have to manage through Dynamo once you "read" the updated/changed Excel data.

    With all that said, there are many, many examples of writing Excel data to Revit using Dynamo out there on the web- group discussions, videos, how-to posts in blogs. I'd start by searching the Dynamo forums: https://forum.dynamobim.com

    Good luck!
    Joe
    Basically what i'm trying to get is to export a multi-cat schedules with heading.

    Catergory
    Family.
    Type
    Description
    Manufactuerer
    Model

    then modify this and import it back in to revit

  4.    #4
    Junior Member
    Join Date
    November 17, 2011
    Posts
    34
    Current Local Time
    04:14 PM
    Nick,

    What you're asking is actually very complex. Going through the scheduled properties you list:

    -Category: the category of elements can't be changed

    -Family and type: You will only be able to change these properties to a family/type that already exists in the project, so you'll have to do some error-checking to validate anything you enter, then match that to the actual family and type elements, grab that data, and assign it to the element. (the first result of a quick Google search for "revit dynamo change family" returns this example as the first result: https://forum.dynamobim.com/t/how-to...ily-type/10757 )

    -Description, Manufacturer, and Model: these are type properties (which, if you change, will affect every element of that type, so you can't just change it for one element). I'm sure you can google "revit dynamo change type property" and find some help.

    Do some research, give it a go, and if you run into roadblocks, post back with more specific questions.

    Good Luck!
    Last edited by Joe_Charpentier; September 12th, 2018 at 07:52 PM.
    Dave Jones and amoursol like this.

  5.    #5
    Senior Member
    Join Date
    November 27, 2012
    Posts
    572
    Current Local Time
    09:14 PM
    Quote Originally Posted by Joe_Charpentier View Post
    Nick,

    What you're asking is actually very complex. Going through the scheduled properties you list:

    -Category: the category of elements can't be changed

    -Family and type: You will only be able to change these properties to a family/type that already exists in the project, so you'll have to do some error-checking to validate anything you enter, then match that to the actual family and type elements, grab that data, and assign it to the element. (the first result of a quick Google search for "revit dynamo change family" returns this example as the first result: https://forum.dynamobim.com/t/how-to...ily-type/10757 )

    -Description, Manufacturer, and Model: these are type properties (which, if you change, will affect every element of that type, so you can't just change it for one element). I'm sure you can google "revit dynamo change type property" and find some help.

    Do some research, give it a go, and if you run into roadblocks, post back with more specific questions.

    Good Luck!
    I'm not interested in changing the category, family, and type - these are mainly there to show which families they are.

    is the type parameters in the families i want to change, as i have a shed load that are all blank and i need to add all this data to them all.

  6.    #6
    Member
    Join Date
    September 19, 2015
    Posts
    160
    Current Local Time
    10:14 PM
    This tutorial should help to get started:
    https://www.youtube.com/watch?v=XlKnNW9KqSU
    Joe_Charpentier likes this.

  7.    #7
    Forum Addict josephpeel's Avatar
    Join Date
    May 3, 2012
    Posts
    1,329
    Current Local Time
    10:14 PM
    When you export your data to excel, you should always add the ID of the elements that contain the parameter data.
    Then however the data gets sorted or changed in excel, so long as the rows are still by the correct ID numbers you can link the data back the correct elements.

    When you import the data from excel, feed the ID column data into a Get Families by ID node to give a list of families/element that is in the same order as the rest of your data. Then you can use Set Parameter by Name to put the data from the other excel columns into the parameters in the families.

    Finally... always check the data after importing. If something goes wrong with the list order, everything will be wrong and you dont want to save that and have to fix it later.

    (Also do some research on export to SQL. For some applications that is actually a better solution than using excel, excel is really poor as a database..)
    Last edited by josephpeel; September 13th, 2018 at 01:36 PM.
    amoursol and Joe_Charpentier like this.

  8.    #8
    Moderator cellophane's Avatar
    Join Date
    August 9, 2011
    Location
    Louisville, KY
    Posts
    5,860
    Current Local Time
    04:14 PM
    Quote Originally Posted by josephpeel View Post
    When you export your data to excel, you should always add the ID of the elements that contain the parameter data.
    Then however the data gets sorted or changed in excel, so long as the rows are still by the correct ID numbers you can link the data back the correct elements.

    When you import the data from excel, feed the ID column data into a Get Families by ID node to give a list of families/element that is in the same order as the rest of your data. Then you can use Set Parameter by Name to put the data from the other excel columns into the parameters in the families.
    I haven't tried that method, but Dynamo always exports in numerical order by Element ID, so when writing back to Revit I've always just made sure my Excel is sorted by the Element ID column, or I do a lot of swearing and undoing..
    Joe_Charpentier likes this.

  9.    #9
    Senior Member amoursol's Avatar
    Join Date
    November 21, 2012
    Location
    London, United Kingdom
    Posts
    612
    Current Local Time
    09:14 PM
    Even better - use Dictionaries with the ID as key
    elton williams and tuekappel like this.

  10.    #10
    Senior Member Ning Zhou's Avatar
    Join Date
    July 20, 2011
    Posts
    814
    Current Local Time
    01:14 PM
    even better - use UniqueId instead of Id to make sure it's exact the same element, Id is suffice in most cases but may not the case for complex Revit project especially when multi-session Revit process etc
    tuekappel and JWR like this.

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 1
    Last Post: August 25th, 2017, 10:25 PM
  2. Replies: 0
    Last Post: January 16th, 2017, 01:49 AM
  3. Renaming From Excel - After Sorting Data in Excel
    By cellophane in forum Dynamo BIM
    Replies: 8
    Last Post: January 18th, 2016, 02:24 PM
  4. Replies: 3
    Last Post: June 6th, 2015, 11:18 AM
  5. Change all element created in a phase to be created in another
    By The Dropper in forum Architecture and General Revit Questions
    Replies: 7
    Last Post: March 20th, 2014, 01:18 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
  •