View Full Version : PlotSettings: Plot Styles?
2009-01-12, 11:24 PM
Does anybody know an easy way to set a plot style to my plot?
Everything I try ends with an error in AutoCAD, as soon as I plot without a plot style it starts working again, but my program is useless without a plot style.
I know it's probably something really simple, though as I've figured out through this whole plot settings, then plot info, then plot settings validator, etc. things I would expect to be fairly easy are actually fairly complicated. So much for 3 line plot code as I expected...
2009-01-13, 04:42 PM
I don't plot with plot styles, so this is just an idea.
Did you set the plot style for the database? Maybe doing this will do what you want. Property ' StyleSheet '.
2009-01-13, 09:05 PM
I gave that a try already, as soon as I add the lines:
string Style = LstStyle.SelectedItem.ToString();
My program stops working.
2009-01-13, 09:14 PM
Stupid question; Is the drawing set to plot using a ctb or plot styles? I'm assuming plot styles.
Let me see if I can find anything.
Edit: Looks like the setCurrentStyleSheet method wants a layout as the first argument.
2009-01-14, 11:22 PM
Maybe this is a stupid question but.... there's a difference between plot style tables and CTBs? Isn't a CTB the filetype of a plot style table?
A CTB being an AutoCAD Colour Dependant Plot Style Table File.
To answer the question, I'm trying to plot using a file called CW_Black.ctb, though The LstStyle gives a choice of which ctb to use.
2009-01-14, 11:49 PM
There are two ways to plot; one uses CTB and the other uses STB. On another board, ctb is not really a plot style, at least as I read. So I'm sorry for the confusion there. If you are using a ctb, then it is easy. Here is the line of code from my plot routine.
ctbFile property is just the string name of the ctb file; ie. HappyPlotting.ctb, not the whole path to it.
I'm pretty sure you can figure out what the variables are.
Hope that helps.
If you want to see the code, it is posted here:
[ http://www.theswamp.org/index.php?topic=17348.0 ]
2009-01-15, 04:07 AM
THANKYOU! I knew it was something simple!
That's the same code I was using, except I had one overload slightly wrong.
Difference between CTB and STB isn't that big.
CTB is "Color-Dependant Plot Style Table", STB is "Plot Style Table".
We never use line weights, we use colours instead and then the colour is translated into a line weight. Eg. colour 1 = 0.18 2 = 0.35 3 = 0.5 etc.
2009-01-15, 03:02 PM
Glad we were finally able to get on the same page. You're welcome.
Powered by vBulletin® Version 4.1.11 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.