Message 1 of 2
SaveAs in 2006

Not applicable
02-09-2006
02:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
We work in a SBS network. All projectdrawings are saved on a directory on the server.
In acad 2002 I use a custom command that saves a drawing on a local path on the client machine, in this case in the folder c:\acad2002\dwg\nameofhtedrawing.dwg, and right after that it saves this drawing to the network folder g:\projectfolder\dwg\nameofhtedrawing.dwg.
Both commands use ThisDrawing.SaveAs. Because the last command saves the drawing to the network folder you continue your work in that same folder. This is the same folder where you opened the drawing
Now here comes the problem:
In acad2006 we use the same command. First a SaveAs to the local path, secondly a SavaAs to the network path. Both saves are done correctly but strangely the current work path is the local path, so you continue your work on the local c:\acad2002\dwg path. This is strange because you'd assume that acad will contine in the last saved path, wich would be the network path. Below I copied a piece of the code. Any help is welcome since I tried many things the last two days without any result.
Dim sDwgName As String
Dim sCurPath As String
Dim sLocalSavePath As String
sDwgName = ThisDrawing.Name
sCurPath = ThisDrawing.Path & "\"
sLocalSavePath = "c:\acad6002\dwgs\"
ThisDrawing.SaveAs sLocalSavePath & sDwgName
ThisDrawing.SaveAs sCurPath & sDwgName
Thanks in advance!!
In acad 2002 I use a custom command that saves a drawing on a local path on the client machine, in this case in the folder c:\acad2002\dwg\nameofhtedrawing.dwg, and right after that it saves this drawing to the network folder g:\projectfolder\dwg\nameofhtedrawing.dwg.
Both commands use ThisDrawing.SaveAs. Because the last command saves the drawing to the network folder you continue your work in that same folder. This is the same folder where you opened the drawing
Now here comes the problem:
In acad2006 we use the same command. First a SaveAs to the local path, secondly a SavaAs to the network path. Both saves are done correctly but strangely the current work path is the local path, so you continue your work on the local c:\acad2002\dwg path. This is strange because you'd assume that acad will contine in the last saved path, wich would be the network path. Below I copied a piece of the code. Any help is welcome since I tried many things the last two days without any result.
Dim sDwgName As String
Dim sCurPath As String
Dim sLocalSavePath As String
sDwgName = ThisDrawing.Name
sCurPath = ThisDrawing.Path & "\"
sLocalSavePath = "c:\acad6002\dwgs\"
ThisDrawing.SaveAs sLocalSavePath & sDwgName
ThisDrawing.SaveAs sCurPath & sDwgName
Thanks in advance!!