Revit Split and reorganize content for implementation in Library content by revit version.

''outline version of VBS from CMS file below
''Takes default Revit library and splits it into metric, Imperial and reorganizes IES files and similar to more logical locations.
Option Explicit
''Dim Wscript As New objWSCRIPT_Emulator
Const VBQT = """"
Sub main()

    ''take path from drag and drop
    ''  e.g. ObjArgs(=) should be C:\ProgramData\Autodesk\RVT 2015
    ''  Set it as the source path
    Dim ObjArgs
    Dim i
    ''for drag-n-drop
    Set ObjArgs = Wscript.Arguments ''
    For i = 0 To ObjArgs.count - 1  ''
       Wscript.Echo ObjArgs(i)      ''
End Sub

Sub SplitRevitLibrary()
    ''use src path
        ''determine if the target folders are where they should be
End Sub

Sub Xcopy(strSource As String, strDest As String)
    Dim strLogFilename
    strLogFilename = " /LOG+:C:\temp\RVT_%version%_SPLIT.txt "
    strSource = " " & VBQT & strSource & VBQT & " "
    strDest = " " & VBQT & strDest & VBQT & " "
    ''wscript.ObjShell.Run ("c:\windows\system32\robocopy.exe " & strSource & strDest & " /e /Z /DCOPY:T /MT:8 /XO /IT /XJ /FFT /DST /XJD /XJF /R:0 /TBD /TEE" & strLogFilename)
End Sub

'@echo off
'Rem file-folder path for drag and drop
'Set source=%~1
'echo %source%'
'Rem set source=C:\ProgramData\Autodesk\RVT 2015
'Set Version = 2015
'set NewPath=C:\ProgramData\Autodesk
'set USImperial=%newpath%\RVT-[client]-I(US)-%Version%
'set USMetric=%newpath%\RVT-[client]-M(US)-%Version%
'set CANMetric=%newpath%\RVT-[client]-M(CAN)-%Version%
'Set RoboPrefs=/e /Z /DCOPY:T /MT:8 /XO /IT /XJ /FFT /DST /XJD /XJF /R:0 /TBD /LOG+:%newpath%\RVT_%version%_SPLIT.txt /TEE
'Rem --SET COPY  English Templates (US)
'set Src=%source%\Family Templates\English_I\
'set Dest=%USImperial%\Family_Templates
'robocopy "%Src%" "%Dest%" %RoboPrefs%
'set Src=%source%\Family Templates\English\
'set Dest=%USMetric%\Family_Templates
'robocopy "%Src%" "%dest%" %RoboPrefs%
'set Dest=%CANMetric%\Family_Templates
'robocopy "%Src%" "%dest%" %RoboPrefs%'

'Rem --SET COPY IES For Metric & Imperial
'set Src=%source%\ies\
'set Dest=%USImperial%\Libraries\Lighting\IES
'robocopy "%Src%" "%dest%" %RoboPrefs%
'set Dest=%CANmetric%\Libraries\Lighting\IES
'robocopy "%Src%" "%dest%" %RoboPrefs%

'Rem --SET COPY Imperial Library<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
'set Src=%source%\Libraries\US Imperial
'set Dest=%USImperial%\Libraries
'robocopy "%Src%" "%dest%" %RoboPrefs%'

'Rem --SET COPY US Metric Libraries<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
'set Src=%source%\Libraries\US Metric
'set Dest=%USmetric%\Libraries
'robocopy "%Src%" "%dest%"  %RoboPrefs%

'set Src=%source%\Libraries\Canada
'set Dest=%CANmetric%\Libraries\
'robocopy "%Src%" "%dest%" %RoboPrefs%

'Rem --SET COPY CONDUIT TABLES - Metric & Imperial
'set Src=%source%\Lookup Tables\Conduit
'set Dest=%USImperial%\Libraries\Conduit\Lookup_Conduit
'robocopy "%Src%" "%dest%" %RoboPrefs%
'set Dest=%USMetric%\Libraries\Conduit\Lookup_Conduit
'robocopy "%Src%" "%dest%" %RoboPrefs%
'set Dest=%CANmetric%\Libraries\Conduit\Lookup_Conduit
'robocopy "%Src%" "%dest%" %RoboPrefs%

'Rem --SET COPY Metric & Imperial
'set Src=%source%\Lookup Tables\Pipe
'set Dest=%USImperial%\Libraries\PIPE\Lookup_Pipe
'robocopy "%Src%" "%dest%" %RoboPrefs%
'set Dest=%USMetric%\Libraries\PIPE\Lookup_Pipe
'robocopy "%Src%" "%dest%" %RoboPrefs%
'set Dest=%CANmetric%\Libraries\PIPE\Lookup_Pipe
'robocopy "%Src%" "%dest%" %RoboPrefs%

'Rem --SET COPY Project Templates
'set Src=%source%\Templates\US Imperial
'set Dest=%USImperial%\Project_Templates
'robocopy "%Src%" "%dest%" %RoboPrefs%'

'set Src=%source%\Templates\US Metric
'set Dest=%USMetric%\Project_Templates
'robocopy "%Src%" "%dest%" %RoboPrefs%

'set Src=%source%\Templates\Canada
'set Dest=%CANMetric%\Project_Templates
'robocopy "%Src%" "%dest%" %RoboPrefs%

'Rem --SET COPY Dictionaries
'set Src=%source%
'set Dest=%USImperial%
'robocopy "%Src%" "%dest%"  revitEN?.dic
'set Dest=%USMetric%
'robocopy "%Src%" "%dest%"  revitEN?.dic
'set Dest=%CANMetric%
'robocopy "%Src%" "%dest%"  revitEN?.dic



Popular posts from this blog

Revit area plans adding new types and references (Gross and rentable)

Revit Floor patterns and materials