Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
I would like to edit a binary file, it is a HPGL plot file extension *.hpp that I would like to add (append) some esc. codes and text to ? How can I do that and still keeping the file format for printing ? In the editor (EDT in this case) I will lose the record length... My brain is lost in space... Any idea someone...?Best Regards, Magnus

Hi again,
Please is there anyone who could give me a hint... or tell me to be more specific in my question maybe ?
I am trying with the old EDT editor but so far no luck, I have FORTRAN 77 installed on this computer if someone can give me an idea using that...
My thoughts so far is to find a way how change the fixed lenght of the HPGL/2 file to be able to edit it and maybe then add the change I want to make and then convert it back to original format for printing...Best Regards,
Magnus

I'm not sure if I understand your problem. Maybe you could post a "DIR /FULL" of the unedited and edited file?
Have you tried to edit it with TPU ? When you do a 'set keypad edt' as first editor command, it will be like edt.
Have you tried to convert it with a FDL of the unedited file ? so :
$ ANALYZE /RMS /FDL myfile.hpp
$ EDT myfile.hpp
*EXIT
$ CONVERT /FDL=myfile.fdl myfile.hpp newfile.hppHave you looked at the SET FILE /ATTRIBUTE command ?

I have after received some corrupted files in the HPGL format, but that is an other story... finally got a solution.
The HPGL file is with fixed length 512 byte records and file organization is sequential (using DIR/FULL). I can not use edit, that is still a question? Records are too big and will be truncated to 255 characters but my first goal was to append some strings and that is achieved.
Thank You ME for giving me the good advice to use convert.
With CONVERT/APPEND/PAD="NULL" append_file old_hpgl.hpp - where the append_file is my stuff for adding some lines just containing some text and esc codes (using EDT) to the old file and fill it with null characters, the result is ok! That means it is printable and looks perfect.
I will "dig" some more to see if I can in some way also convert it for direct editing?
Using the suggestions You gave me ME, thanks again!

EDT only supports files with a maximum record length of 255. So unless you write a program that chops the records in half, it is unusuable.
TPU supports files with a much longer record length (4096 ?). So that may be an option to edit them direct. If you set the keypad to EDT it will look quite similar (although slower) like EDT :$ EDITX /TPU myfile.hpp
Then hit the top right key at the numeric keypad (PF4/the minus), and type : SET KEYPAD EDT

Hello Magnus,
What you could try is the following,
First save the File Definition of the file withANALY/RMS YOURFILE.HPP /FDL
This creates a YOURFILE.FDL
Now edit the file with your favorite editor ;-)) and save it.
ThenCONVERT /FDL=YOURFILE.FDL YOURFILE.HPP YOURNEWFILE.HPP
This should restore the file definitions to the orginal file.....Hope this will work,
Goodluck,
Jo

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |