View Full Version : Worked in 2002 not in 2005

2004-12-06, 01:20 PM

I have a program that plots multiple drawings that are in model space. The program works fine in 2002 but not in 2005. I receive a “WARNING: Incompatible or missing plot style” in 2005. If I set the plot style manually it works fine, if the program sets the plot style it shows up but it’s like it doesn’t apply it. All the code is being applied to the ActiveLayout. Here is a piece of the code.

With ThisDrawing.ActiveLayout
.ConfigName = which_pc3
.CanonicalMediaName = "ANSI_D_(34.00_x_22.00_Inches)"
.PlotWithPlotStyles = True
.StyleSheet = ocestyle
.PlotType = acExtents
.StandardScale = acScaleToFit
.PlotRotation = ac0degrees
.CenterPlot = True
End With


2004-12-07, 12:55 AM
Of the top of my head, I would say that after setting the ConfigName is when you need to do the RefreshPlotDeviceInfo.

2004-12-07, 12:15 PM
I've tried it everywhere and it makes no difference.


Ed Jobe
2004-12-08, 04:21 PM
I would check to make sure that your support paths are correct and that acad is able to locate the files. Coming from pre-2004, many users get caugt off guard by the fact that support dirs are now located in several places to meet windows standards. I assume that "which_pc3" is a variable. Does it contain the full path? If not, acad may be looking for it in the wron dir.

2004-12-09, 08:04 PM
The "which_pc3" contains the full path to the .ctb file. After running the program I can do a plot manually and it shows the correct file selected but when plotted it gives the same error. I can then plot it again but this time select the file (.ctb) and it will plot without any errors. It's like the program sets the correct .ctb but it's not setting it as active.


2004-12-15, 08:49 PM
The answer is... if anybody else needs this.

Separate the path (.PrinterStyleSheetPath) from the plot style table (.StyleSheet).


2004-12-21, 03:24 PM
Can you explain that a bit further? .PrinterStyleSheetPath wasn't in the sample code.

I assume that you were a bit overzealous in trimming your posted code and that statement was in your original code in the same With block. If that is so, then I can see why the error would occur. The object wasn't updated after changing the path, so of course the .ConfigName would fail in that case.