Wednesday 30 January 2013

Type Catalogue Addendum

I posted back in October a tip for editing Type Catalogues from within Revit

A slight problem with this is sometimes it doesn't work and the batch script returns:

'CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory.'

By adding the following lines to the top of the script, this will solve this:

cd %~p0

From what I can see, this is caused by linked files that have UNC pathnames as opposed to drive mapped. When the Revit model is opened and the links loaded, if the last loaded link has a UNC path, the current directory is set at that UNC path and the script won't run. The lines above pull the drive letter of the running batch script and reset the path