Está en la página 1de 2

'Script to render and export TIFFs for every specified view, courtesy of buildz. blogspot.

com ' ' 'put this file in the same folder as the .rvt file to be rendered. 'set your RENDER SETTINGS below 'save changes and drag this file from Windows Explorer onto your Revit shortcut icon to run. 'The last saved state of your file MUST be: 'all views to be rendered in the file MUST have render settings set to "print" N OT "screen" 'render quality of each view must be set to something other than target output ( i.e. you can't save the view with quality set to "High" if script is going to se t it to "High" too) 'You can ignore these next two lines Dim Jrn, FileName Set Jrn = CrsJournalScript '''''''''''''RENDER SETTINGS''''''''''''''RENDER SETTINGS''''''''''''''''RENDER SETTINGS''''''''''''' ''''''''enter your file name YourFileName = "Project1_noWorksets.rvt" ''''''''put all your views here, syntax is view names in double quotes seperated by commas, add more as needed ViewArray = Array("3D View 1","3D View 2") ''''''''enter your desired output dpi, you can't put in a preset dpi (i.e., 75, 150, 300, or 600)or the dpi to which the view is currently set ResolutionDPI = "50" ''''''''enter your desired quality, choices are Draft, Low, Medium, High, or Bes t RenderQuality = "Low" ''''''''if your file is workseted, set value to 1, if not workseted, set to 0 RenderWorksets = 1 '''''''''''''END OF RENDER SETTINGS''''''''''''''END OF RENDER SETTINGS''''''''' '''''''END OF RENDER SETTINGS''''''''''''' Jrn.Command "Internal" , "Open an existing project , 57601 , ID_REVIT_FILE_OPEN" Jrn.Data "File Name" , "IDOK", YourFileName Jrn.Browser "Activate" , " " Jrn.Browser "ToggleExpandedState" _ , ">>Views (all)>>3D Views>>" For Each View in ViewArray Jrn.Browser "Activate" , " " Jrn.Browser "SelChange" , ">>Views (all)>>3D Views>>" & View & ">>" Jrn.Browser "LButtonDblClk" , ">>Views (all)>>3D Views>>" & View & ">>" 'zoom to fit Jrn.Command "ContextMenu" , "Performs a ""Zoom To Fit"" in all open windows. , 3 3151 , ID_ZOOM_ALL_ALL" 'call Render Dialogue Jrn.Command "KeyboardShortcut" , "Display the raytraced view. , ID_PHOTO_RENDERI

NG_VIEW" 'set resolution Jrn.ComboBox "Modeless , Rendering , Dialog_Revit_ProteinRenderingDlg" , "Contro l_Revit_RenderDpi" , "ReplaceContents" , ResolutionDPI Jrn.ComboBox "Modeless , Rendering , Dialog_Revit_ProteinRenderingDlg" , "Contro l_Revit_RenderDpi" , "Select" , "Custom (" & ResolutionDPI & " dpi)" Jrn.Data "Transaction Successful" , "Rendering Settings" 'set renderquality Jrn.ComboBox "Modeless , Rendering , Dialog_Revit_ProteinRenderingDlg" , "Contro l_Revit_RenderQuality" , "SelEndOk" , RenderQuality Jrn.Data "Transaction Successful" , "Choose a rendering quality setting" 'render Jrn.PushButton "Modeless , Rendering , Dialog_Revit_ProteinRenderingDlg" , "Rend er, Control_Revit_Render" Jrn.Data "Transaction Successful" , "Rendering Settings" 'export image Jrn.PushButton "Modeless , Rendering , Dialog_Revit_ProteinRenderingDlg" , "Expo rt..., Control_Revit_ImageExport" Jrn.Data "FileDialog" , "IDOK", View & ".tif", "tif" , View & ".tif", View Jrn.Data "FileType" , "TIFF Files (*.tif)" 'reset to original state Jrn.Command "AccelKey" , "Undo the last action , ID_EDIT_UNDO" Jrn.Command "AccelKey" , "Undo the last action , ID_EDIT_UNDO" Jrn.Command "AccelKey" , "Undo the last action , ID_EDIT_UNDO" 'end of loop Next 'quit Revit Jrn.Command "SystemMenu" , "Quit the application; prompts to save projects , 576 65 , ID_APP_EXIT" If RenderWorksets Then Jrn.PushButton "Modal , Suggest Relinquish , Dialog_Revit_SuggestRelinquish" , " Don't Relinquish, Control_Revit_DontRelinquish" End If

También podría gustarte