I have a 2011 Civil3D drawing with Data shortcuts in it. I need to replace the source drawing path of the data shortcut with another path. Is there a way to change this either manually or, preferably, programically. At some point we'll need to batch through the drawings and change this path information. Is this information is stored in a drawing dictionary somewhere? If so, where? If not, where?
Updating the .XML data files doesn't appear to affect data links already in the drawing.
Thanks for any help,
A shortcut for the DataShortcut Editor should be in the Start Menu. You can use this to change the paths.
That updates the XML files but does not seem to change the location for paths already in the drawing itself.
For example, in E-TO SES Run for my Drawing AAAA.DWG, the data Source drawing points to something like: G:\adirlocation\anotherdirlocation\dwgs\elec\syste
The Data Shortcuts editor for E-TO SES RUN 4 shows a path of C:\REFS and the source file being #XSES2-0-42.DWG
As a follow up. Temporarily rename or move the original source file. Open the file you want the updated ref in now and C3D won't find the original. You should be able to repair the data referance and point it to the new source dwg and object.
It seems no matter what you do if the original location of a DS still exists it will always resolve to that location first, so rename/remove the original folder location.
I have done this in the past. I'm not sure if it still works but when you tried this did you also change the "Use to Match" field to "Name Only" after changing the path? I think that needs to be done as well.
Thanks. I'll try moving the original in a test as soon as I get a chance.
Unfortunately some of the drawings were pathed using UNC paths instead of mapped drives as per a whitepaper recommendation. Mapped drives we may be able to work with but not the UNC paths. Something for others to consider if they find the need to change dwg locations. In our case localization of files where the files will exist on a server and the designers computer.
I ran some tests.
I created one master drawing on a G:\ location and a modified copy on C:\. I then created a Slave drawing on C:\ which referenced the master on G:\
Using the data shortcut editor I updated the path to C:\ and opened the slave drawing. It pulled in the data from the G:\ master.
If I removed or renamed the master drawing on G:\ then opened the slave drawing, it simply did not find the master instead of using the location specified in the .XML. It did not matter if the xml specified using handle or name.
So the question is where is the shortcut information stored in the drawing file and is there a way to change it through an API call?
Access a broad range of knowledge to help get the most out of your products and services.