This tip is not limited to CADWorx. It can be applied to many types of files that CAD users may need, I have simply decided to demonstrate how “Symlinks” can help a common frustration for CADWorx users and CADWorx administrators.
First – What is a “Symlink”?
- A Symlink is a “Symbolic Link” and as the following link describes:
- “a symbolic link (also symlink or soft link) is a special type of file that contains a reference to another file or directory” http://en.wikipedia.org/wiki/Symbolic_link
Symlinks can be manually created using the Windows command line as shown here: http://php.net/manual/en/function.symlink.php
I personally don’t like using the Windows command line because it always seems to be so touchy and easy enter an error. So with a little help from a quick google search, there happens to be a nice (free) user interface dialog box that lets you create Symlinks with all of the options that are available to symlinks in the Windows command line.
Link to the free symlink creator: https://code.google.com/p/symlinker/
Here is a suggestion for how to administer a project using CADWorx and its various modules like P&ID, Plant, Equipment and even Electrical available here: http://www.ecedesign.com/ElectroMOD
As shown below, a sample folder structure for an oil & gas company named “Cletus Oil & Gas Co”.
Notice that under the the main folder that contains the name of the Client & Project, there are 3 folders. This varies from company to company, but there is usually a “WIP” folder (Work In Progress). This is where the designs and CAD files are placed. In the example I have shown, I think that it makes sense to control the order of these folders. That is why there is a “1” before “WIP” and an underscore before “Project Resources” These are the 2 folders that are relevant to this post.
_Project Resources is the folder where the CAD admin could place the needed files that the client has either provided and/or you have created for them in order to use their standards… The “Plotting” folder normally contains the needed .ctb files for the project. The “Templates” folder could contain the various .dwt files as well as title blocks. But for the example for CADWorx, notice the CADWorx folder and how it is broken up into sub-folders of the various modules of CADWorx.
In each of these folders, there are mainly 3 files that we are concerned with:
- .cfg file – Configuration file that defines various settings for CADWorx but also lists the path where the next 2 files can be found.
- .cat file – Catalog file defines parts or “Components” that are found in actual manufacturers parts catalogs. a multitude of additional information can be defined in the .cat file
- .prj file – Project file defines what parts (“Components”) are needed for a project. This file pulls the components from the .cat file and also defines what information needs to be pulled from the catalog and how it should be displayed.
As you might know, the folder in which you open a .dwg file is also considered a “support path,” So a common practice, is to copy the .cfg files into the various WIP folder so that the CADWorx users can have the proper components for a project. The more complex the project, the more these files can be scattered about a project. An obvious issue is how sloppy this can be and difficult to manage. If something were to change in the .cfg file, you will need to make sure to re-copy it into the many WIP folders so that they all get the updates as well.
This is where adding a symlink to the various .cfg files can be a real life saver and also a clean way to make changes to one file and all of the other files receive the updates automatically. Some of the benefits are obvious but you might need to take the extra time needed to set the project up in the beginning and communicate to the team how this works.
Launch the “Symbolic Link Creator” tool
Change the top drop-down list to “File symbolic link” this will allow you to create the symlink to a specific file. In our case, the .cfg file
Link File Area (middle area of dialog box). Click the “Explore” button and navigate to the folder where you want the link to go. IMPORTANT – Give the file a name INCLUDING the file type extension. Sidenote – CADWorx looks for the first .cfg file in its support paths and if the file is named “Project.cfg” that one takes precedence. That is why I named it “Project.cfg”.
“Destination File (Lower portion of the dialog box). Click the “Explore” button to navigate to the .cfg file you want to be the “Master” file located under the “_Project Resources” folder.
Repeat for the various folder that you want to have “copies” of the .cfg file
Note that the file that is created in the various folders does have the correct Icon as a .cfg file but it has a little arrow in the lower left of the icon that you normally see on desktop icons. It also doesn’t have any file size and under the “Type” column it shows as a “Configuration File”
When CADWorx sees this file in the folder, it is actually reading from the .cfg file located under the “_Project Resources” folder. This is important to understand and communicate to the rest of the project team. If they make changes to the .cfg file in their folder, it is going to make those changes to the “Master” file and therefore make changes to the rest of the folders that have links to the “Master” .cfg file.
I think that after some good documentation and communication to the people working on the project, the benefits of using symbolic links will pay off and also add value to the project by knowing that changes to the project are live and everyone will get the most up to date changes.
What other uses can you think of that Symbolic Links can be used for? Share your thoughts below in the comments section.
How would this work in and an vanilla AutoCAD environment? AN example similar to the above for be appreciated.
Hello, nice article . Employment in CAD is surprisingly easy to find, because it is a specialization and all the worlds are not able to draw level homes.
The only issue that I have come across with this is that the link is broken if the user modifies it through cadworx –> setup. Once it is broken, the changes are only saved to what was once the symlink. If the .cfg or its link are modified through notepad, everything works fine. Have you had the same problem?
That’s a good point. I haven’t tried modifying the .cfg file through CADWorx.
I am wondering if there is a way to make the symlinks that are deployed “read only” that way the user has to modify it at the higher level (controlled) folder?