1. Help in fixing error

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

new topic     » topic index » view message » categorize

2. Re: Help in fixing error

tp176 said...

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.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Help in fixing error

Thanks for the attempt but it Didn't work. Same error.

Tony

new topic     » goto parent     » topic index » view message » categorize

4. Re: Help in fixing error

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

new topic     » goto parent     » topic index » view message » categorize

5. Re: Help in fixing error

tp176 said...

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

new topic     » goto parent     » topic index » view message » categorize

6. Re: Help in fixing error

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

new topic     » goto parent     » topic index » view message » categorize

7. Re: Help in fixing error

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

new topic     » goto parent     » topic index » view message » categorize

8. Re: Help in fixing error

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

new topic     » goto parent     » topic index » view message » categorize

9. Re: Help in fixing error

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:

said...

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.

new topic     » goto parent     » topic index » view message » categorize

10. Re: Help in fixing error

Thanks again!

Tony

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu