1. Help in fixing error
- Posted by tp176 Apr 02, 2013
- 1417 views
First of all - I am NOT a programmer - trust me!
I am using a file by Mike Duffy - under GEN 2STROKE. This thing works great and I can certainly appreciate his efforts.
Problem is when I try to open a file saved by this program as an ACAD .dxf type, it says that the file is incomplete or corrupted.
Any help in this would be greatly appreciated.
Thank you in advance,
Tony P BNP Machine, Inc bnpmachine@verizon.net
2. Re: Help in fixing error
- Posted by gbonvehi Apr 05, 2013
- 1358 views
First of all - I am NOT a programmer - trust me!
I am using a file by Mike Duffy - under GEN 2STROKE. This thing works great and I can certainly appreciate his efforts.
Problem is when I try to open a file saved by this program as an ACAD .dxf type, it says that the file is incomplete or corrupted.
Any help in this would be greatly appreciated.
Thank you in advance,
Hi Tony,
I must admit I don't understand very much the domain of this specific program and neither the dxf format type but I think it might have to do with line endings. The DXF format seems to be just ascii with a specific format and when writing it this program is appending an extra \n.
I don't have AutoCAD to test this so here you've to links to test:
- Changed .e files: https://www.dropbox.com/s/ckzmh46tijdsqoy/changes.zip
- Sample CA175 output: https://www.dropbox.com/s/q7fjcflmpr3k25v/CA175.zip
Cheers,
Guillermo
PS: I was able to "upgrade" the program using dos_rescue so you can run it in Win 7 64-bit using Euphoria 4.X if needed.
3. Re: Help in fixing error
- Posted by tp176 Apr 05, 2013
- 1281 views
Thanks for the attempt but it Didn't work. Same error.
Tony
4. Re: Help in fixing error
- Posted by tp176 Apr 05, 2013
- 1256 views
I have just compared outputs of the .dxf files from this to a file that is valid and found that the problem is some information is being added at the begining of the file that makes it unrecognizable. I removed that info and the file opes fine.
How can I eliminate that info from being transferred?
Thanks
5. Re: Help in fixing error
- Posted by gbonvehi Apr 05, 2013
- 1241 views
I have just compared outputs of the .dxf files from this to a file that is valid and found that the problem is some information is being added at the begining of the file that makes it unrecognizable. I removed that info and the file opes fine.
How can I eliminate that info from being transferred?
Thanks
I'm glad you could find the problem. According to the quick reads I made about DXF I was having some doubts if that info was valid or not. It basically adds some information about the current "project".
To remove that extra information, open conic.e file with some editor.
At line 1019 you should see something like
puts(hfile,"999\r\n" & name & " " & date_string() & "\r\n")
You should comment those lines (add two dashes at the beginning of each of them) until and including the following lines:
puts(hfile,"999\r\nNumber of points=") print(hfile,npts) puts(hfile,"\r\n")
After modifications the source should be like:
--puts(hfile,"999\r\n" & name & " " & date_string() & "\r\n") --if length(cmt) then -- puts(hfile,"999\r\n" & cmt & "\r\n") --end if --puts(hfile,"999\r\nDimensions are in " & unts & "\r\n") --puts(hfile,"999\r\nPanel width=") printf(hfile,fmts,w) --puts(hfile," Panel heigth=") printf(hfile,fmts,h) --puts(hfile,"\r\n999\r\n" & thks & "\r\n") --puts(hfile,"\r\n999\r\nOrigin is at " & orgs & "\r\n") --puts(hfile,"999\r\nNumber of points=") print(hfile,npts) --puts(hfile,"\r\n")
Another option is to remove those lines which is easier, just be sure to make a backup :)
That should be it.
Cheers,
Guillermo
6. Re: Help in fixing error
- Posted by tp176 Apr 05, 2013
- 1211 views
I can't seem to find what you are explaining to me. I find nothing like that and how can I see the line numbers?
Tony
7. Re: Help in fixing error
- Posted by gbonvehi Apr 05, 2013
- 1257 views
Sorry Tony, I forgot you're not a programmer. You should be able to find those lines inside the conic.e file which is distributed with Mike Duffy's program ( http://www.rapideuphoria.com/2stroke.zip ). It's an ascii file which you should be able to open with any text editor and depending on the editor, see the line number somewhere.
To save the trouble I've prepared a modified version of the file conic.e, just replace it in your current 2 stroke directory.
You can grab it from: https://www.dropbox.com/s/2mndu9o4shgqbts/conic.e
8. Re: Help in fixing error
- Posted by tp176 Apr 05, 2013
- 1260 views
It WORKS How do we make it so anyone else using this program gets the right file fixes or gets the file if they download new?
Tony
9. Re: Help in fixing error
- Posted by gbonvehi Apr 05, 2013
- 1247 views
I've just sent Mike an e-mail but I don't know if the address specified in readme.txt is still valid.
These lines are taken from the readme too:
Finally please feel free to modify or use any portion of this program to suit your own needs. If you distribute a modified copy the only thing I ask is that you document the changes and give users a way to contact you, in the event of a problem with the program.
So I guess if he doesn't answer I'll repack the program with this fix and upload it to rapideuphoria.com.