PDA

View Full Version : Export



fhunth
2005-09-26, 06:44 PM
Is it possible to export a rvt file to a jpeg using the API.

It happens that i have not Revit and i must download revit files(.rvt).
Process it using the API and export it to a jpeg image(or any image)?

I am not sure the revit API can be used on a Windows Forms (for example) application

For what i have understood it is only usable on the Revit Interface.

Thanks for any help.

Danny Polkinhorn
2005-09-26, 07:40 PM
Sorry, it's not possible to do this. Applications developed with the Revit API must run from within Revit. This isn't possible with AutoCAD either without licensing RealDWG, so I don't expect this functionality any time soon.

You can download Revit and use it in Demo/Viewer mode to export your JPGs as long as you don't modify the files.

FK
2005-09-27, 09:04 PM
Definitely, Demo mode is the way to go.

fhunth
2005-09-27, 09:10 PM
I must do it on a server-side process without user intervention.

I need a process that takes a rvt file and generates an image.

So demo mode is not a solution.

Thanks

truevis
2005-09-27, 11:44 PM
Don't you just do File>Export>Image and export multiple views? No API needed. (Maybe I misunderstand the question.)

hand471037
2005-09-28, 03:35 AM
I need a process that takes a rvt file and generates an image.

How big do these images need to be? If they are thumbnails you need Windows has them. Whenever you save out your Revit file, a thumbnail image is generated of the active view to become the 'preview' image you see when you click on the file or go to View -> Thumbnail within Windows Explorer. If you had something that could get to those, via some Windows API, then you could do it as a stand-alone process that would 'scrape' that thumbnail from the Revit file.

However, you'd only get the last active view, and you'd only get it small. So this probably doesn't help...

FK
2005-09-29, 03:17 PM
This is completely unsupported, but you can accomplish that now with a journal file.

James.Lupton
2005-09-29, 09:40 PM
We do this sort of thing all the time with journal files and because the journal is a script file you can incorporate DO WHILE loops IF statements etc. to do repetative tasks.

You need to spend a bit of time working with the jounal file to cut our bits which are not needed but eventualy the file can become quite simple.

You can launch Revit
Open a file
Select and export the images
and then close down the revit file
all with no user interaction other than draging the journal file onto the revit object.

We use this approach to print ourt a series of images to represent construction phases of the project or to produce fly through avi files of each different stage.

hand471037
2005-09-29, 10:01 PM
Have you looked into simple Windows Automation software? Rather than trying to drive Revit headless, you can drive Windows headless, and direct what keys and mouse moves you need to be done to get what you want. There's a couple of these applications out there, such as AutoIt...

http://www.hiddensoft.com/AutoIt/