Ronjonp - thanks again for all of the assistance.Just a guess but if your server name is hardcoded into the config name then it might be as easy as stripping the path and appending the name of the new server like so ( untested ).
Here are the results.
"\\\\rrj-s1\\OceTDS450"
"\\\\rrj-sbs2011\\CAD Copier BW KM C364" "\\\\rrj-sbs2011\\CAD Copier BW KM C364"
The first response I don't understand, as the Oce Plotter is not a page setup for the drawing I used.
Also, I do not have an RRJ-S1 server, so I have no idea where that info is coming from.
ronjonp,Ooops .. had a typo. Revised code in original post.
The last version of FOO that you posted crashes in Model Space with the following error:
-psetupin Enter file name: Server3.dwt Enter user defined page setup(s) to import or [?]: *
Command: Regenerating model - caching viewports.
; error: Too many actual parameters
Remarks
This property does not take a fully qualified path, only the file name for the configuration file. Use the PrinterConfigPath property to specify the path for printer configuration files.
Use the RefreshPlotDeviceInfo method before trying to change the ConfigName property.
Do not assign the ConfigName property a value of "None." Attempting to do so results in unexpected behavior.
That being said just try refreshing the plot device info:
ronjonpYour printer names are NOT the same:
Attached is a sample 8 1/2" x 11" Portrait drawing and the Server3 template file where the updated page setups are stored.
Thanks again for looking at this.
The layout doesn't store the name of the page setup used to set the current settings. The CopyFrom method doesn't copy the name of the page setup to the Layout. It only copies the settings to the layout. You just have to choose a page setup to make current. If you are going to batch the files, choosing a page setup for all the files shouldn't be a problem.Ageed. The idea was to see what was used last and match it. Picking a default would be much easier :)
That could work. However, I was responding more to the OP. If you can get him to agree, your job would be simpler. Personally, in my office, I don't worry about updating existing dwgs. I have a routine that performs the update to a standard via one click. So its not a loss of productivity to have users do the update as needed.The layout doesn't store the name of the page setup used to set the current settings. The CopyFrom method doesn't copy the name of the page setup to the Layout. It only copies the settings to the layout. You just have to choose a page setup to make current. If you are going to batch the files, choosing a page setup for all the files shouldn't be a problem.Ageed. The idea was to see what was used last and match it. Picking a default would be much easier :)
I guess I could compare a list of properties using vl-every for the tabs and the imported pagesetups to get a 'match'.