Revit Disseminator for OOTB Content to geographic folders
Revit Disseminator
@ECHO off
rem :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
REM DISSEMINATES REVIT OOTB DRAG AND DROPPED FOLDER TO CLIENT-SPECIFIC NAMED FOLDERS
REM file-folder path for drag and drop
REM :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
REM DESTINATION PATH and DEFAULTS:::::::::::::::::::::::::::::::::::::::::::
set NewPath=L:\AUTODESK\L-REVIT
set Version=2019
set Client=ootb_
REM ::: if no source prompts will help find content
@set source=%~1
REM SET Fopt TO ALL BY DEFAULT
set Fopt= /e *.*
rem =======================================================
call :GetPrefixData : CLS REM prefix subroutine
REM ROBOCOPY PREFS DO NOT SPECIFY FILE *.* !
set RoboPrefs= /TEE /NJH /NFL /NDL /NC /Z /DCOPY:T /MT:8 /XO /IT /XJ /FFT /DST /XJD /XJF /R:0 /W:0 /REG /TBD /LOG+:%newpath%\RVT_%version%_SPLIT.txt
rem ===set values=========================================
@ECHO =================================================
@ECHO =USImperial, USMetric, CANMetric=================
set USImperial=%newpath%\%Client%I(US)-%Version%
set USMetric=%newpath%\%Client%MS(US)-%Version%
set CANMetric=%newpath%\%Client%M(CAN)-%Version%
@ECHO =================================================
REM --set COPY Project Templates
set Src=%source%\Templates\US Imperial
set Dest=%USImperial%\000-TEMPLATES-PROJECT
call :RoboCopySub
@ECHO =================================================
set Src=%source%\Templates\US Metric
set Dest=%USMetric%\000-TEMPLATES-PROJECT
call :RoboCopySub
@ECHO =================================================
set Src=%source%\Templates\Canada
set Dest=%CANMetric%\000-TEMPLATES-PROJECT
call :RoboCopySub
@ECHO =================================================
REM --set COPY Dictionaries===========================
set Src=%source%
set Dest=%USImperial%\000-KEYS-CLASS-DIC
set Fopt=revitEN?.dic
call :RoboCopySub
@ECHO =================================================
set Dest=%USMetric%\000-KEYS-CLASS-DIC
set Fopt=revitEN?.dic
call :RoboCopySub
@ECHO =================================================
set Dest=%CANmetric%\000-KEYS-CLASS-DIC
set Fopt=revitEN?.dic
call :RoboCopySub
set Fopt=revitFR?.dic
call :RoboCopySub
@ECHO =================================================
set Src=%source%\UserDataCache
set Dest=%USImperial%\000-KEYS-CLASS-DIC
call :RoboCopySub
set Dest=%USMetric%\000-KEYS-CLASS-DIC
call :RoboCopySub
set Dest=%CANmetric%\000-KEYS-CLASS-DIC
call :RoboCopySub
@ECHO =================================================
@ECHO --Family Templates (US IMPERIAL)---------------------
set Src=%source%\Family Templates\English_I
set Dest=%USImperial%\000-TEMPLATES-FAMILY
call :RoboCopySub
@ECHO =================================================
@ECHO --Family Templates (Metric US)----------------------
REM --set COPY **METRIC TEMPLATES**
set Src=%source%\Family Templates\English
set Dest=%USMetric%\000-TEMPLATES-FAMILY
call :RoboCopySub
@ECHO =================================================
set Dest=%CANMetric%\000-TEMPLATES-FAMILY
call :RoboCopySub
@ECHO =================================================
REM --set COPY IES For Metric & Imperial
set Src=%source%\ies
set Dest=%USImperial%\Lighting\000-IES
call :RoboCopySub
@ECHO =================================================
set Dest=%CANmetric%\Lighting\000-IES
call :RoboCopySub
@ECHO =================================================
REM --set COPY Imperial Library::::::::::::::::::::::::::::::::::::::::::::::::::::::
set Src=%source%\Libraries\US Imperial
set Dest=%USImperial%
call :RoboCopySub
MOVE %DEST%\*.TXT %DEST%\000-KEYS-CLASS-DIC\
@ECHO =================================================
REM --set COPY US Metric Libraries:::::::::::::::::::::::::::::::::::::::::::::::::::::::
set Src=%source%\Libraries\US METRIC
set Dest=%USmetric%
call :RoboCopySub
MOVE %DEST%\*.TXT %DEST%\000-KEYS-CLASS-DIC\
@ECHO =================================================
REM --set COPY CAN METRIC LIBRARIES
set Src=%source%\Libraries\Canada
set Dest=%CANmetric%
call :RoboCopySub
MOVE %DEST%\*.TXT %DEST%\000-TEMPLATES-FAMILY\
@ECHO =================================================
REM --set COPY CONDUIT TABLES - Metric & Imperial
set Src=%source%\Lookup Tables\Conduit
set Dest=%USImperial%\Conduit\000-Lookup_Conduit
set Fopt= /xf M_*.*
call :RoboCopySub
@ECHO =================================================
robocopy "%Src%" "%dest%" %RoboPrefs%
set Dest=%USMetric%\Conduit\000-Lookup_Conduit
set Fopt= M_*.*
call :RoboCopySub
@ECHO =================================================
set Dest=%CANmetric%\Conduit\000-Lookup_Conduit
set Fopt= M_*.*
call :RoboCopySub
@ECHO =================================================
REM --set COPY Metric & Imperial======================
set Src=%source%\Lookup Tables\Pipe
set Dest=%USImperial%\PIPE\000-Lookup_Pipe
set Fopt= /xf M_*.*
call :RoboCopySub
@ECHO =================================================
set Dest=%USMetric%\PIPE\000-Lookup_Pipe
set Fopt= M_*.*
call :RoboCopySub
@ECHO =================================================
set Dest=%CANmetric%\PIPE\000-Lookup_Pipe
set Fopt= M_*.*
call :RoboCopySub
@ECHO =================================================
@ECHO ==FINISHED=======================================
@ECHO =================================================
@ECHO = Run Renamer/Revit file folders cleanup ========
@ECHO =================================================
rem =============================================== end of sub==================
rem =============================================== end of sub==================
rem =============================================== end of sub==================
pause
exit /b
GOTO :EOF
:RoboCopySub
cls
@ECHO ------------------------------------------------
@ECHO.
@ECHO SOURCE:::: %Src%
@ECHO.
@ECHO DEST:::::: %Dest%
@ECHO.
@ECHO Fopt:::::: %Fopt%
@ECHO.
@ECHO Roboprefs: %Fopt% %RoboPrefs%
@IF not EXIST %dest% mkdir %dest%
@ECHO
robocopy "%Src%" "%dest%" %RoboPrefs% %Fopt%
@ECHO ------------------------------------------------
set Fopt= /e *.*
rem pause : REM PAUSE FOR EACH SECTION TO CHECK RESULTS IN DEBUGGING
exit /b : REM EXIT SUB
:GetPrefixData
@ECHO ------------------------------------------------
@ECHO.
if not [%source%] == [] goto SkipSrcQuery:
@ECHO.
set /P Version=Please enter Revit Year or [enter] for %Version%:
IF "%Version%"=="" GOTO Error
@ECHO.
if [%source%] == [] set source=C:\ProgramData\Autodesk\RVT %version%
@ECHO Source Data::: %source%
:SkipSrcQuery
@ECHO.
@ECHO Proceeding with %source%
@ECHO.
@ECHO ------------------------------------------------
GOTO End1
:Error
@ECHO. Nothing entered- exiting!!
exit : REM error exit
:End1
REM CLIENT PREFIX
@ECHO.
set /P Client=Please enter Client prefix or [enter] for %Client% default:
@ECHO.
IF "%Client%"=="" GOTO Error
@ECHO. Proceeding with %Client%!
@ECHO.
@ECHO ------------------------------------------------
@ECHO.
GOTO End2
:Error
@ECHO. Nothing entered- exiting!!
exit : REM error exit
:End2
REM Validate before proceeding:::::::::::::::::::::::::::::::::::::::::::
cls
@ECHO.
@ECHO ------------------------------------------------
@ECHO.
@ECHO. Source:: %Source%
@ECHO.
set /P query=Enter Y to proceed with path %NewPath%\%Client%-[varies]-%Version%:
IF %query%==Y GOTO Proceed3
IF %query%==y GOTO Proceed3
:exit1
@ECHO ------------------------------------------------
@ECHO. Y not entered- Nothing done - Exiting.
exit : REM error exit
:Proceed3
REM NAMING PREFIXES FOR MAIN FOLDERS:::::::::::::::::::::::::::::::::::::
cls
@ECHO --------------------------------------------------------------------
@ECHO --------------------------------------------------------------------
@ECHO. Proceeding with %NewPath%\%Client%***%Version%.
@ECHO --------------------------------------------------------------------
@ECHO --------------------------------------------------------------------
@ECHO.
@ECHO --------------------------------------------------------------------
exit /b
Comments
Post a Comment