No announcement yet.

Revit Structure API - build an addin to export schedule and import back to Revit

  • Filter
  • Time
  • Show
Clear All
new posts

    Revit Structure API - build an addin to export schedule and import back to Revit

    Hello everyone,

    I'm new to Revit API, has some basic knowledge in Revit Structure, Revit API, and C#. I'd like to write an add-in for Revit Structure with the following purpose:
    - Export the current opended Schedule ( ex. Structure Column Schedule) which has 4 columns for example, the last column is a shared parametter which is appear empty in the schedule.
    - open that exported schedule in MS Exce and do a concatenate ( copy all the text in the first 3 columns to the last column in each cell)
    - Import back to Revit Structure and create a new Schedule with the info from the previous step.

    As far as I know, there is no API to interact with the Schedule in Revit( Please correct me if I was wrong).
    My question is: Is it possible to do this? Is there any other way to archive the same thing like this? What and Where should I start with? I've been looking on how to do this but still strugle in the last step, dont know how to create a new schedule in the same project with the concatenated table from MS Excel.

    Thanks in advance ! Sorry for my bad English

    As far as I know this can't be done straight from exporting the data from the schedule and then back in again. But what you could look at doing is:

    1. In your api create a filter that grabs exactly the same objects that the schedule is showing.
    2. Once you have these objects you can then export the parm values that you want to excel and do what ever you need to do.
    3. Then reimport the column 4 data back in and write those values to the correct parm.
    4. The schedule will auto update with that data

    If all you are wanting to do is Combine the values of the first 3 columns there is actually no need to goto excel at all. I would do that in the code.

    If you do need to go to excel and back again there is a good example in the SDK.

    Good luck.

    Phillip Miller
    Kiwi Codes Solutions Ltd
    Makers of "Family Browser" and "Project Browser" for Revit.


      Thanks for the fast reply Phillip,

      Yes I would love to know how to combine the values of the first 3 columns to the 4th column. This is exactly what i wantted to do. I thought this can't be done with the code, that why I have to think a workaround way to do it. Your helps is really appreciated. Thanks so much Phillip.
      I've been working with the sample RoomSchedule in the API sample. But it seems quite complicated to narrow and convert it to my need.


      Related Topics