Glad you found it, but the new one won't matter because it doesn't use the path for anything (which sould make it faster). The problem was that if it's not a real path, then it doesn't know where to find the drawing, so it can't open it up in the ObjectDBX app. That would be an easy fix, you would just need to add a 'findfile' call here.
(setq dwgName InsName)
Change to
(setq dwgName (findfile InsName))