Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Viewing HPGL files within Clipper 5.2

Status
Not open for further replies.

nicksteel

Technical User
Jan 2, 2001
18
US
I have older code that utilizes C primatives to draw graphic charts from data base files while displaying actions on screen. In the past, I used a call: Setvideomo(18) to switch to graphics screen, Setvideomo(-1) to return to text screen. This still switches to graphics screen under NT and XP and runs, but does not return to the window and goes full screen low resolution text.

As an alternative, I need to know if there's anything available that would allow me to create the HPGL code and then use something else to view it on screen while remaining within the original window upon completion.
 
A crude but effective way could be to switch from Clipper to xHarbour and use the GTWVT (Windows Virtual Terminal) device, that mimics the @ say syntax, but also caters for graphics primitives in the same windows. In fact the @ x,y to w,z commands draw lines in graphics mode, so I disabled them in the .ch file to get back to the 'original' Clipper behaveour where the line drawing characters are overwriteable with text ;-)
It practically comes down to include a .ch file and link a .lib, and your up and running. The hardest part will be switching from Clipper/Blinker linkscripts to xHarbour/iLink scripts :-(
xHarbour can be found at and it's commercial evenknie at the .com street.

HTH
TonHu
 
If you are just talking about HP/GL code, you could try the PageView program from Lincoln.

One of my clients bought an enterprise licence for it a while ago - and has used it for years, very reliable - available in colour and b/w variants.

HTH

Regards

Griff
Keep [Smile]ing
 
Thanks, I'll check these things out. My application generates code, like:

IN;
SC 000,639,000,479;
SR .5,1;
LT;
VS 20;
SP 1;
PA 010.0,469.0;
PD;
PA 630.0,469.0;
PA 630.0,009.0;
PA 010.0,009.0;
PA 010.0,469.0;
PU;

The application plots on the screen as it generates the corresponding HP/GL plotter code for either plotter or laser printer. My only problem is switching back from graphics mode to text mode WITHIN my original window.
 
That code is pure HP/GL the old plotter language.

IN; - initialise
SC 000,639,000,479; - scale coordinates
SR .5,1; - scale relative
LT; line type
VS 20; - can't remember!
SP 1; select pen 1
PA 010.0,469.0; pen move to 10, 469
PD; pen down
PA 630.0,469.0; pen move...
PA 630.0,009.0;
PA 010.0,009.0;
PA 010.0,469.0;
PU; pen up




Regards

Griff
Keep [Smile]ing
 
Oh, basically that code is a box!

if it's prefixed with chr(27)+"%0B" most HP printers can interpret it directly.



Regards

Griff
Keep [Smile]ing
 
Oh, basically that code is a box!

[smile]Yeah, that section is.

if it's prefixed with chr(27)+"%0B" most HP printers can interpret it directly.

[smile]Yes, I have an option for this or plotter output file.

Actually, the system generates a time phased set of planned/actual/forecast curves based upon Primavera dates and physical progress data. I've been involved with project control in the Oil and Gas Industry for many years and have developed several systems that relate Work Breakdown Structures with schedule and resource models.
 
Whooa that's close to home!

Lincoln is probably the thing for you then - there are others, possible even free ones.

Lincoln have a demo that's free - worth persuing.

Good luck!

Regards

Griff
Keep [Smile]ing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top