Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Exporting/Printing schedule containing image

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
programmer59
1828 Views, 4 Replies

Exporting/Printing schedule containing image

programmer59
Contributor
Contributor

Hi,

 

When I create a schedule with images (for exemple rebar with the image of the shape)

 

I would like to : 

 

export it in Excel (with the image)

print the table in a pdf file (with the image too)

 

Is it possible ? How to do this?

The only think I know, is to copy/paste the view (Schedule) on a sheet in Revit, but it is not handy.

 

Concerning this topic, I would like to do this manually, and with lines codes in C++ API.

 

 

Best Regards,

CIvil Engineer

 

0 Likes

Exporting/Printing schedule containing image

Hi,

 

When I create a schedule with images (for exemple rebar with the image of the shape)

 

I would like to : 

 

export it in Excel (with the image)

print the table in a pdf file (with the image too)

 

Is it possible ? How to do this?

The only think I know, is to copy/paste the view (Schedule) on a sheet in Revit, but it is not handy.

 

Concerning this topic, I would like to do this manually, and with lines codes in C++ API.

 

 

Best Regards,

CIvil Engineer

 

4 REPLIES 4
Message 2 of 5
jeremytammik
in reply to: programmer59

jeremytammik
Autodesk
Autodesk
Accepted solution

You can access the schedule data and the images it contains programmatically, e.g., using the Revit Schedule API:

 

http://thebuildingcoder.typepad.com/blog/2012/05/the-schedule-api-and-access-to-schedule-data.html

 

Then, you can use that data and the Excel programming interface to generate a spreadsheet from that.

 

You can use other programming libraries to generate a PDF from the same data.

 

Please consult Excel and PDF-specific programming documentation for those tasks, since they have nothing to do with the Revit API.

  



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes

You can access the schedule data and the images it contains programmatically, e.g., using the Revit Schedule API:

 

http://thebuildingcoder.typepad.com/blog/2012/05/the-schedule-api-and-access-to-schedule-data.html

 

Then, you can use that data and the Excel programming interface to generate a spreadsheet from that.

 

You can use other programming libraries to generate a PDF from the same data.

 

Please consult Excel and PDF-specific programming documentation for those tasks, since they have nothing to do with the Revit API.

  



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 5
programmer59
in reply to: programmer59

programmer59
Contributor
Contributor

Hi Jeremy

 

 

Thanks a lot for your answer. I've not tried yet your solution, but I will try.

I've seen the link you sent. When exporting the schedule, it does that to a text file with separation. So, how could it work with images in the data base of the schedule?

 

 

 

0 Likes

Hi Jeremy

 

 

Thanks a lot for your answer. I've not tried yet your solution, but I will try.

I've seen the link you sent. When exporting the schedule, it does that to a text file with separation. So, how could it work with images in the data base of the schedule?

 

 

 

Message 4 of 5
programmer59
in reply to: jeremytammik

programmer59
Contributor
Contributor

Hi

 

I have tried the following code : 

 

/*FilteredElementCollector col
    = new FilteredElementCollector( doc )
      .OfClass( typeof( ViewSchedule ) );
 
  ViewScheduleExportOptions opt 
    = new ViewScheduleExportOptions();
 
  foreach( ViewSchedule vs in col )
  {
    Directory.CreateDirectory( 
      _export_folder_name );
 
    vs.Export( _export_folder_name, 
      vs.Name + _ext, opt );
  }*/

 

 

It works only for data containing text and numbers. But when the schedule contains a image, it only export the name of the image (see my export test in the screencast below)

0 Likes

Hi

 

I have tried the following code : 

 

/*FilteredElementCollector col
    = new FilteredElementCollector( doc )
      .OfClass( typeof( ViewSchedule ) );
 
  ViewScheduleExportOptions opt 
    = new ViewScheduleExportOptions();
 
  foreach( ViewSchedule vs in col )
  {
    Directory.CreateDirectory( 
      _export_folder_name );
 
    vs.Export( _export_folder_name, 
      vs.Name + _ext, opt );
  }*/

 

 

It works only for data containing text and numbers. But when the schedule contains a image, it only export the name of the image (see my export test in the screencast below)

Message 5 of 5
jeremytammik
in reply to: programmer59

jeremytammik
Autodesk
Autodesk
Accepted solution

So, you can implement the next step: from the name of the image, navigate to the image itself and  include the required information into your output in the desired manner, for instance by adding a graphical representation of the image.

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes

So, you can implement the next step: from the name of the image, navigate to the image itself and  include the required information into your output in the desired manner, for instance by adding a graphical representation of the image.

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report