Project - Sync Project Files
Last updated: 2024-01-30
Overview
This command automates the process of cascading changes throughout project files, by synchronizing External References, Data References, rebuilding surfaces, and rebuilding corridors. For edits to cascade to all files correctly, the files need to be opened and corridors/surfaces within them need to be rebuilt in the correct order.
A common example of this would be:
Alignment/profile file > corridor file > refinement surface file > cross section file > quantities file
The Civil 3D objects that can be rebuilt with this tool are corridors and surfaces. Corridor surfaces do not need to be specified as they will rebuild when their source corridor is rebuilt. The user can provide a .csv file that lists the files and objects in order that need to be updated.
Input .csv file
An example .csv file can be found here: SyncFiles.csv
It is recommended that an input file used with this script be stored with the project that it is intended for.
The columns of the .csv file in order are as follows:
- x or blank: This is a trigger that allows a user to control whether or not a file is processed. Depending on the number of files and their use in a project, you may want to skip files to reduce processing time.
- Full path and filename: This contains the full path and filename to the root drive of the files to process.
- Corridor, Surface, or blank: If a corridor or surface needs to be rebuilt, that must be designated here. If a file has multiple corridors and/or surfaces, each object to be rebuilt needs it's own line. Corridor surfaces do not need to be rebuilt.
- Object name: Name of the object to be rebuilt. If there are multiple corridors and or surfaces to be rebuilt in a file, each object needs it's own line entered in the order it should be processed.
Create the input .csv file
- Save the example SyncFiles.csv to the Civil 3D project you want to use it with.
- In Excel, open the SyncFiles.csv and delete out the sample data.
- Open File Explorer and navigate to the location of the Civil 3D project. Example: N:\pds\c3d\ProjectID
- Search for *.DWG. Make sure you search on all subfolders.
- Select all results
-
Home tab > Clipboard panel > Copy path
- In Excel, paste the results into Column B
- Re-order the files if needed.
- At the highest level, files should go in the order of the following highest level subfolders: base > dsgn > sheets
- There will likely be further data flows that need to be considered for order of processing.
- Add the names of any corridors and surfaces that should be processed.
- Corridor surfaces will automatically rebuild with their corresponding corridor rebuild.
- Existing surfaces and refinement surfaces need to be specified for rebuilding
- If there are multiple corridors that need to be rebuilt in the same file, there needs to be a separate line for each corridor (and therefore mulitple lines for that file). The corridors should be listed in the order they need to be rebuilt (i.e. setup corridor before production corridor)
- Save SyncFiles.csv after all edits.
Usage
WisDOT Survey or WisDOT Design or WisDOT Sheets tab > Manage panel > Project menu > Sync Project Files
The tool can also be accessed from the command line: DOTSYNCPROJECTFILES.
-
Click the folder icon to select the input .csv file.
-
After loading the .csv file, the file list will appear in the dialog.
-
Each file with a checkmark in the Process column will be processed.
-
If the input .csv file included an "X" in the first column, the process column will automatically be checked.
-
-
Sync Options:
-
Choose the desired option under DRef Sync Options.
SYNCHRONIZEREFERENCE will only synchronized data references that Civil 3D detects have been changed. However, this option does not synchronize alignment masks.
AECCFORCESYNCHRONIZEREFERENCES will synchronize all data references regardless of detected changes. This option assures all changes are reflected. However, this option also increases processing time.
-
Check the Sync with WisDOT Reference Templates box to synchronize the drawings with the WisDOT reference templates.
Info: This will only synchronize with WisDOT reference templates. Other reference templates will be unaffected by this setting. This option is available to drawings that were already connected with the WisDOT reference templates.
Warning: Synchronizing with reference templates requires significantly more processing time.
-
-
Prior to clicking OK, verify that all affected project files are closed.
Warning: If a file is already opened or opened while the command is running, you will be notified when the command attempts to open the file.
-
Command line and Event Viewer prompts that are involved in synchronizing files will echo as usual.
-
If any of the files, object types, or object names are not found where the .csv indicates, you will receive an Abort/Retry/Ignore option.
-
A log file will be generated with the results.
Updating referenced templates (Civil 3D 2024+)
With the Civil 3D 2024 version, WisDOT has introduced an option to update referenced template paths using the Sync Project Files tool. There is no available Civil 3D API to make changes to referenced template paths, so WisDOT is using the Windows User Interface API to replicate the picks, clicks, and typing a user would perform to make the referenced template path updates.
- Check the "Sync with Referenced Templates" box to enable the remap functionality.
- Check the "Remap Referenced Templates" box
- In the "Find" field, enter the string or strings that the tool should search for in the referenced template paths. Multiple strings, separated by a ';' can be entered.
- In the "Replace" field, enter the string that should replace what is entered in the "Find" field.
- In the “Remove” field, enter the template file names that should be removed from the reference template list. The entire path is not needed, just the file name. Multiple strings, separated by a ';' can be entered. By default the “ref-ex-dwg-settings.dwt” and “ref-dwg-settings.dwt” files are entered since those were retired with the WisDOT Civil 3D 2024 package.
-
Click OK. The Sync Project Files will open each file in the file list. As it opens each file, it will open the Attach Referenced Template dialogue, search for the specified text and replace it when is found.