Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
We have a problem with some of the mathcad tools that data-file they come with needs to be periodically
updated. The easiest way would be if we could like a file reading function to an internet location
of the latest file. But it does not appear to work. Is there any way to make it work and
to use addresses like ftp or html for example in READFILE?
Any vbscripts anybody developed to solve this problem?
Regards,
Yevgen
Have never used it but just gave it a try:
READPRN failed, but
Menu: Insert / Data / File_Input
worked with http:// target, too.
As you mentioned vbscripts I'm assuming we are talking about real Mathcad (V15-).
Thanks a lot. That works, and with data input wizard it works even with differnt data files like binary.
Now how about being able to un-compress a file inside mathcad? Some web-sites only allow
to put files on the web if they are compressed in *.zip format. Is there any way to load the zip file
as binary (that works, I tried) and than un-compress it inside mathcad itself?
I know that zip compression has been around for long time, so its algorithm is well known.
Did anybody implement the decompression in mathcad yet?
Regards,
Yevgen
I know that zip compression has been around for long time, so its algorithm is well known.
Did anybody implement the decompression in mathcad yet?
I've never seen an implementation and it wouldn't be that easy as there is not one but quite a lot of different compression algorithms possible in a zip-file. So you would be the first to implement a Mathcad zip decompression routine - if you finish, post it here please 😉
I can't provide the script but the best I could think of is fetch the zip-file in Mathcad and save it locally. Then, using a scripted component, decrompress is locally using one of the commandline decompression programs which sometimes accompany the zip-programs or maybe the GUI-version of your unzipper itself has a commandline mode.
Then you can load the unpacked file in MC the normal way.
Another way would be to try to fool the website in question by simply renaming the datafile to *.zip. Maybe even adding the magic two bytes "PK" in front of the file (in case the website looks for that signature of Phil Katz), which MC easily could discard.
Yevgen,
Have a look at this link.
http://mathcadworksheets.blogspot.co.uk/2010/11/connecting-mathcad-to-internet-data.html
Regards,
Thomas
Is there a way to load a binary file using similar method? I tried loading a binary file I get a string "d" as a result...