TheSwamp

Code Red => .NET => Topic started by: T.Willey on March 16, 2007, 05:57:53 PM

Title: Plot freezeing at 48 bytes in printer que
Post by: T.Willey on March 16, 2007, 05:57:53 PM
I am still having problems with this code.  I'm not sure if its the code or if it's the printer I'm sending my test to.  I have redesigned it a little, and I like the format now better (for now  :-D).  Does anyone have any ideas why it will stop spooling the print file in the printer at 48 bytes?

On a side note:
Does anyone have any simple examples of dragging items in a listview to reorder them?  The ones I have seen seem complicated, but if that is the only way, then I will drive in a see what they are doing.

Thanks in advance.
Title: Re: Plot freezeing at 48 bytes in printer que
Post by: TonyT on March 17, 2007, 11:56:45 AM
Does anyone have any simple examples of dragging items in a listview to reorder them?  The ones I have seen seem complicated, but if that is the only way, then I will drive in a see what they are doing.

Hi Tim. 

There's probably no simple examples, because
drag and drop operations in a listview are not
simple. ;)

Have a look here:

   www.codeproject.com/cs/miscctrl/DragAndDropListView.asp (http://www.codeproject.com/cs/miscctrl/DragAndDropListView.asp)


Title: Re: Plot freezeing at 48 bytes in printer que
Post by: T.Willey on March 18, 2007, 02:38:17 AM
Does anyone have any simple examples of dragging items in a listview to reorder them?  The ones I have seen seem complicated, but if that is the only way, then I will drive in a see what they are doing.

Hi Tim. 

There's probably no simple examples, because
drag and drop operations in a listview are not
simple. ;)

Have a look here:

   www.codeproject.com/cs/miscctrl/DragAndDropListView.asp (http://www.codeproject.com/cs/miscctrl/DragAndDropListView.asp)



That is what I was scared of Tony, thanks for the conformation.  I will have a look on Monday when I can try some coding with it.
Title: Re: Plot freezeing at 48 bytes in printer que
Post by: T.Willey on April 03, 2007, 05:36:21 PM
An update.  I have been talking back and forth with the ADN, and we are not getting anywhere.  They did make me test different things, and the program will plot to file just fine, but that is the only way it will work right now.  If anyone has any idea I would LOVE to get this working.

Thanks in advance.
Title: Re: Plot freezeing at 48 bytes in printer que
Post by: T.Willey on May 15, 2007, 03:28:00 PM
                               YES!!!
I finally got it to work.  I had an epiphany last night while trying to sleep.  I change one thing, and now it works.  The problem was I was setting last plot to false until the last drawing selected was to be plotted.  So today I changed it to always be true, and it works.  I think that last plot is only false if you are plotting more than one space per drawing, but since I'm not, it will always be true.

Maybe I confused myself by calling it LastPlot, when in the arx help it calls it LastPage

Should I tell ADN?  They couldn't help me... I guess I will so that someone like me doesn't have to find this out by themselves.

I'm so happy right now.  Attached is the one that works per my testing in '06.
Title: Re: Plot freezeing at 48 bytes in printer que
Post by: Kerry on May 15, 2007, 07:00:01 PM
I'm really happy for you Tim .. I know you've had a tempestuous relationship with this routine.
Title: Re: Plot freezeing at 48 bytes in printer que
Post by: T.Willey on May 16, 2007, 11:44:30 AM
I'm really happy for you Tim .. I know you've had a tempestuous relationship with this routine.
Thanks Kerry.  It does feel really good to know this one works.  My old lisp one worked, but this one doesn't close the open drawing, and this one opens them up as read only, so it doesn't matter if they are open already, it will open them and print them.
Title: Re: Plot freezeing at 48 bytes in printer que
Post by: LE on May 16, 2007, 11:58:54 AM
Tim;

I did a quick view to your code, and it is great to see you, now writing in C#.... cheers man! :)
Title: Re: Plot freezeing at 48 bytes in printer que
Post by: T.Willey on May 16, 2007, 12:15:56 PM
Tim;

I did a quick view to your code, and it is great to see you, now writing in C#.... cheers man! :)
Thanks Luis.   :-D  Been a long way from when you first starting helping me with Lisp over on the Adesk Ng.
Title: Re: Plot freezeing at 48 bytes in printer que
Post by: It's Alive! on May 16, 2007, 12:19:34 PM
What no piccy? :-o
Come on, do a victory lap!
Title: Re: Plot freezeing at 48 bytes in printer que
Post by: T.Willey on May 16, 2007, 01:18:25 PM
What no piccy? :-o
Come on, do a victory lap!
Okay just for you.  I guess I should change the version number to 1.0 since it works now.

Side note: Thanks Glenn for posting how to make .Net applications auto load.  I have mine set up like that now, and love it.

Maybe should add a pic of an empty printer que. :-D
Title: Re: Plot freezeing at 48 bytes in printer que
Post by: It's Alive! on May 16, 2007, 01:44:41 PM
Thank you,
Excellent Work Tim!  8-)
Title: Re: Plot freezeing at 48 bytes in printer que
Post by: T.Willey on May 16, 2007, 03:21:02 PM
Thank you,
Excellent Work Tim!  8-)

Thank you Daniel.
Title: Re: Plot freezeing at 48 bytes in printer que
Post by: T.Willey on May 17, 2007, 06:40:43 PM
New question with this routine.  I might have gotten to happy to quickly.

Is there a difference between printers and plotters?  My code will work on printers, but gets and error 'eInvalidInput' when trying to send to the plotter.  I will place some message boxes in my code to see if I can find out where it is coming from.

Thanks in advance.

Edit:  Here is the offending line in my code.  Now to see why.....
Code: [Select]
PltSetVald.SetPlotConfigurationName(PltSet, DeviceName, Paper);
Edit:  I'm thinking the CononicalMediaName is different than the LocalMediaName for the plotter, but not the pritners.  Off to do some testing.......
Title: Re: Plot freezeing at 48 bytes in printer que
Post by: T.Willey on May 17, 2007, 07:32:16 PM
Edit:  I'm thinking the CononicalMediaName is different than the LocalMediaName for the plotter, but not the pritners.  Off to do some testing.......
That was what I had to do.  Here is the code I used for now.
Code: [Select]
PlotConfig pc = PCM.SetCurrentConfig(DeviceName);
foreach (string str in pc.CanonicalMediaNames) {
if (string.Compare(pc.GetLocalMediaName(str), Paper) == 0) Paper = str;
}