New plotting software - Page 2 - diyAudio
Go Back   Home > Forums > Commercial Sector > Manufacturers > GedLee

GedLee Home of the renown Geddes Loudspeakers

Reply
 
Thread Tools Search this Thread
Old 18th May 2010, 04:17 AM   #11
gedlee is offline gedlee  United States
diyAudio Member
 
gedlee's Avatar
 
Join Date: Dec 2004
Location: Novi, Michigan
I am not surprised. Its an all MS code and configuration (.net). I guess that you'll just have to use IE.
  Reply With Quote
Old 18th May 2010, 05:04 AM   #12
diyAudio Member
 
Join Date: Mar 2005
Location: Saskatoon, Saskatchewan, Canada
Will only launch from IE for me, won't from Chrome.

After it launches shows the piston response fine. Then when I try to change to a different dataset I get a dialog after about 1min that says "Can't open data files". After I close that, attempting to do anything else gets a dialog box that says "Should not be here!!" or "oops, should not be here!!".

I get a 200 response in Fiddler when launching the application, but I don't see any requests for the data files when I try to change to any of the other data sets.
  Reply With Quote
Old 18th May 2010, 02:14 PM   #13
diyAudio Member
 
Join Date: Mar 2005
Location: Saskatoon, Saskatchewan, Canada
I'll check again later today as now that I think about it, I'm not positive fiddler was configured such that it would have detected any requests from your program.
  Reply With Quote
Old 18th May 2010, 03:34 PM   #14
gedlee is offline gedlee  United States
diyAudio Member
 
gedlee's Avatar
 
Join Date: Dec 2004
Location: Novi, Michigan
I don't know "fiddler", but I am certain that it won't run in anything but IE. Once the program tries and fails to open a data set anything can happen - its basically in free-fall. And I am way out of my comfort zone here since I have no idea how internet connections to data files work. I tried what I use and it worked for me (probably sheer luck!) and thats as far as I went and probably as far as I will go since I have no intention of becoming a "web" programmer. I still struggling with VB.Net. The last software clas that I took was FORTRAN in the early 70's. After that it was all bootstrap!

For those savy, it takes me a long time for the program to connect to a data set, but then the data transfer is fast and thats with my code running locally. So there must be a whole lot of layers that the code goes through to get to the files - this many layers and there is a high likelyhood of a failure. There are simpler ways to do this, but I am not willing to let go of the security that I have this way for the easier implimentation. So we will just have to wait and see.

If anyone has any ideas why it would connect some of the time for some people and not for others I am all ears. Could the ISP be involved?

Basically I just use a standard file "open" call with a file name. I tried using a URL and it worked - well sometimes. Its NOT a .NET web connection, which is much more difficult to code. The other idea that I had was to imbed the data in the code itself, but I don't know how to do that - maybe a DLL. Using txt data files is just too transparent.
  Reply With Quote
Old 18th May 2010, 04:48 PM   #15
diyAudio Member
 
Join Date: Mar 2005
Location: Saskatoon, Saskatchewan, Canada
Could you post some of the code pertaining to accessing the files? Really tough to give any suggestions without seeing the code.

Also the raw links to where the data files are located could help. Could try getting them from a browser or command line and see if there are any problems there. Which will help with determining if it's your code or your isp.

Fiddler is a stand alone program that monitors http traffic on your local machine. Allows you to view all http traffic happening from your machine. I was hoping to see the actual requests for the data files which might have revealed some issues.
  Reply With Quote
Old 18th May 2010, 05:04 PM   #16
gedlee is offline gedlee  United States
diyAudio Member
 
gedlee's Avatar
 
Join Date: Dec 2004
Location: Novi, Michigan
Function open_data() As Integer

Dim current_line As String()

open_data = Open_data_errors.INITIAL

Try
If String.IsNullOrEmpty(file_name) Then Err.Raise(514)

Using myStreamReader As New FileIO.TextFieldParser(web_name & file_name)
myStreamReader.TextFieldType = FileIO.FieldType.FixedWidth
myStreamReader.FieldWidths = width_
For ik = 0 To Max_X_Points
current_line = myStreamReader.ReadFields

catch ...
You are getting here with the error that you showed

If you get to the last line above the "catch" then its fine because that reads the entire file line by line and stores it in the string array and then parses it out to the data array

file_name="coax.txt"
web_name = "www.gedlee.com/"

I can open the txt file in IE with no problems and if you can do that as well then I am not sure what the problem is.

Note that web_name = "HTTP://www.gedlee.com/" causes a compiler exception, which I found odd.
  Reply With Quote
Old 18th May 2010, 07:23 PM   #17
diyAudio Member
 
Join Date: Mar 2005
Location: Saskatoon, Saskatchewan, Canada
I might have some time to play with it a bit after work. But some quick googling found this:

Simple web File download in VB.NET

I think you'll want to use this example, but after you have the HttpWebResponse object, you should be able to pass the return value from its GetResponseStream method (which is a System.IO.Stream) to one of the constructors for TextFieldParser that takes a stream rather than a file path.

The HttpWebResponse class takes a url like you would expect and hopefully will result in a better performing stream for web requests.

Requesting a data file directly from a command line took a couple seconds to get the file. So I agree with your assumption that the problem is in your program.
  Reply With Quote
Old 18th May 2010, 10:49 PM   #18
gedlee is offline gedlee  United States
diyAudio Member
 
gedlee's Avatar
 
Join Date: Dec 2004
Location: Novi, Michigan
Yea that looks pretty simple. I could probably use the text parser on the buffer data.
  Reply With Quote
Old 19th May 2010, 07:16 PM   #19
diyAudio Member
 
Join Date: Mar 2005
Location: Saskatoon, Saskatchewan, Canada
Just tested quickly at the end of my lunch hour. Using the HttpWebResponse method I could pull down and parse the summa text file in under 2 seconds.

I also couldn't get the TextFieldParser stream to grab anything over the web. Just threw exceptions looking for the file on a default local path.

Last edited by Dustin B; 19th May 2010 at 07:20 PM.
  Reply With Quote
Old 19th May 2010, 10:47 PM   #20
gedlee is offline gedlee  United States
diyAudio Member
 
gedlee's Avatar
 
Join Date: Dec 2004
Location: Novi, Michigan
Could you send or post what you did that works?
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Plotting a curve for a Tractrix Horn in Adobe Illustrator with Javascript. jpbturbo Multi-Way 8 29th July 2013 10:03 AM
Plotting the graph nicholas1113 Solid State 1 21st May 2011 03:04 PM
plotting load-line for OTL amp? cbutterworth Tubes / Valves 2 19th December 2007 08:41 PM


New To Site? Need Help?

All times are GMT. The time now is 02:09 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2