File Reference

File Reference - MathCAD "Reference" Function - Messages

#1 Posted: 1/27/2016 4:52:00 PM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Moving forward on transferring some engineering calculation sheets from Mathcad to SMath ...
Did the file "Reference" feature get added to SMath? I have several files where I calculate one variable and that value is an variable to another sheet
Example (theoretical files): Calculate heat load due to room geometry and construction in Heatload.sm and import that value to Pump_Flow.sm which feeds into my Pump_Head_Design.sm.

Many of my calculations are cascading. I saw some mention of it on structural type files, but no closure on how to do this.
#2 Posted: 1/28/2016 12:06:37 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

AFAIU [As Far As I Understand], your approach is over killed.
Make a matrix of the Heatload for so many geometry/construction,
Plug that at the top of a work sheet. Next, depending upon the
Heatlod wrt season, determine the min/max massflow rate [on the
same work sheet]. Next proceed to pump sizing wrt the piping
configuration, i.e: the geometry and construction.
Pump sizing is done vs type/supplier of the pump, it is an
iterative procedure in few steps done manually or automatically
from advanced software like "MassBall".
Result: you have ONE work sheet.

That stand alone setup will delight QA control.

Jean
#3 Posted: 1/28/2016 7:54:02 AM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Jean,
This is a simplified example. Others also tie in to a calculation. Electrical, process, mechanical, civil.structural ... I have Mathcad sheets that are set up this way, in use, and already QC'd from back to MathCAD 8 and others love that it's modular.
Question remains, did SMATH ever get the file cascade feature (i.e MathCAD "refeferce")? I know some structural people were discussing this with beams, but I found no resolution.
#4 Posted: 1/28/2016 11:25:23 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Write/read file is only valid for data, not formulae.
I never tried plugging formulae [formulas] in a reference sheet,
but can see a good use of it, vg: collect all dozen PDF/CDF ...
statistical formulas. Also, the monkey busines Bessel that I have
already published in Smath forum [the visitor never acknowledged !].
Another application would be collecting "Image matrices".

Salut Ioan !
comme dans "La Guerre des Tuques" on garde le Fort.

Jean
#5 Posted: 1/29/2016 3:46:54 PM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Wrote

Write/read file is only valid for data, not formulae.
Jean


For now, data is fine. I know there is a different discussion about passing functions from sheet to sheet ... which would be awesome!

I'm OK with "global" definitions of functions being copied from sheet to sheet (e.g d and placed in hidden areas as I ended up doing that in several Mathcad sheets until I started "referencing" a "function" sheet.

Wrote

For my practice I use this steps:

* I write all values that I need as commons in one ore more files, using wfile() command.
* Anywhere I need such already known values, I read these files, using rfile() command.


Thank you, I'll look into these commands as I was blissfully unaware of them
---
Update: How do you get "rfile" to read in the same directory? Attaching two general sheets that are on my desktop. "wfile" appears to work, but "rfile" does not. Working in a network, I would like "rfile" to open the file in the same directory.
Thanks
File not found. File not found.
#6 Posted: 2/1/2016 2:46:27 PM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

ioan92
Ha. I figured it out using the structural Beam thread (Your work). Here is my simplified working version for reference.
Not sure what the other items in your files do for me?File not found.File not found.
#7 Posted: 2/1/2016 5:34:43 PM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Wrote

I coupled many informations in a sys { compound.


"{ compound" ??? I missed that. In the side panel, under functions, correct?

I'm reading into the work being done for structural beam so I can use it on some mechanical items!
The w/rfile is what I need. Instead of using the whole sheet, I'll just have a bunch of "data" files for all values that need to be sent. I can live with that.

If I wanted to bury the data into a subfolder of the working directory, can that be done? Something like putting all of the write data in currentdirectory/DoNotDelete

Also; settingdirectory (CWD) does not appear to do anything. Different directory from everything else
#8 Posted: 2/1/2016 6:24:40 PM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Settingsdirectory() is different than other directories. What does this do? Capture.PNG

Also, can you set the output directory to one level down, automatically?
Something like CWD:=concat(CurrentDirectory(""),"DoNotDelete")
I would like to create a subfolder for the data files.
The directory did not get created, but the output is fine
#9 Posted: 2/1/2016 6:49:50 PM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Not allowed to add semicolon before "fordata". I've tried. Latest version of SMath

OK, you need to PHYSICALLY create the subfolder in the working directory. Your screenshot is similar to what I posted but didn't work. Wondering why your screen shot shows a semicolon, and mine worked with a comma delimeter. Adding the subdirectory is the ticket.
#10 Posted: 2/2/2016 12:14:45 AM
Ryan Freund

Ryan Freund

19 likes in 339 posts.

Group: User

Increasing demand for a "better (no offense intended)" include() function... Yeah! :d
#11 Posted: 2/2/2016 1:16:13 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Elsid,

I like simple setups, things that go like the horse back home.
As you open this work sheet, it will assign the file WRITE/READ
directory [in C:\SmathFile] .The remaining is Smath functionality.

No problem to store formulas, recover via symbolic.
You could get the formula calculate a discrete data set,
write to file and recover. But that would be scratching
the left ear with the right hand.

"append" to file does not exist in Smath. Lot more simple
and genious is the "collector", example given.
I have not exhausted filing matrices and nested data.

Maybe like Mathcad: WRITE/READ in program ? RemToDo.

Jean

File WriteRead.sm (24 KiB) downloaded 80 time(s).
#12 Posted: 2/2/2016 1:28:55 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

As a side note, "Append" in Mathcad was used to collect results
that appear/disappear [temporary results]. A good example is the
advection wave bouncing/back phenomenon.

Jean
#13 Posted: 2/2/2016 11:22:35 AM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Wrote


... it will assign the file WRITE/READ directory [in C:\SmathFile].
File WriteRead.sm (24 KiB) downloaded 80 time(s).


Jean,
1) Deleted
2) You are naming both data dump files "Belzier" so yes, the second write is overwriting the first, even with different variables (p and p1)
3) Yes, you can fix the working directory; however, I want it with the project. Much like item 2, I do not want to re-write files that are used for other calculations/projects.
#14 Posted: 2/2/2016 1:00:10 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Yes Elsid: it does exactly what you want it to do,
even store/retrieve formulas [retrieve symbolic].

Jean
#15 Posted: 2/2/2016 9:21:30 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Salut Ioan, thanks for commenting.

However, you can't create a folder with the CurrentDirrectory command; the folder must be created from outside, previously. What you can is only to set the current folder.
==> With such direct short addressing in C, it creates the special folder Microsoft style, opens NotePad. But it is resident only from the Smath work sheet it was created.

==> "copy/paste" ... you can't me more right ! the simplest/safest way to work, as long as within Smath work sheets. No point to copy an image or graph from work sheet to any other application , the "World" is blind to Smath creation.

==> as you say: no much use for storing formulas in file [deceptive to some user]. No matter how good one may think of himself, between the mind spark and the keyboard, the passage must be treated via the eye. "logistic", simple ? not so yet if you would have to see the expansion of "exp" ... you would drop on the knees if instead of "exp" it would be "x^y"... you would drop dead [tout mouru] on more complex formulation . As far as I have seen in Smath, there is NO use for storing formulas in file, even as referenced work sheets. The only use for cross referencing work sheets is for Hanbook of multiple functionalities.
I started Mathsoft Collaboratory on its birthday, few visitors. When I left it, I was read 3000 times in two days, no demand for cross referenced work sheets ... No need in Mathcad, why needed in Smath ?

It is obvious that each of these files is created with a different codification: mat(), sys() and el().
==> Right: we are used to Smath as an equation editor but within itself it works in its own code that NotePad opens in Smath script format. Quite instructive for those mad of scripting maths [from my innocent view point]. How would it work copying an Smath code to Sagemath, Scilab, Matlab ... ?

Very interesting thread.

Jean
1 users liked this post
ioan92 2/3/2016 2:49:00 AM
#16 Posted: 2/2/2016 11:13:34 PM
Ryan Freund

Ryan Freund

19 likes in 339 posts.

Group: User

I can assure you that there is much demand to transfer information between worksheets.
Maybe not so much if you are just using Smath for Math equations, etc. but once you want to use it for some sort of engineering application/project. The ability to transfer information would be awesome.
Read/write is good because it offers lots of control but it is a bit messy and cumbersome. I think the include() function has promise.
1 users liked this post
ioan92 2/3/2016 2:50:00 AM
#17 Posted: 2/2/2016 11:54:53 PM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Wrote

...Mathsoft Collaboratory on its birthday, few visitors. When I left it, I was read 3000 times in two days, no demand for cross referenced work sheets ... No need in Mathcad, why needed in Smath ?

Jean


Jean,
I too was in the collab. And much like your argument against units (there are merits). I can assure you that the vast amount of help on my questions, yours responses included, went into sheets that where referenced in one way or another. I always "dumbed" down the questions on a single sheet for ease of explanation to my question. Example: see my posted sheets/attachements above vs. ioan's and your responding sheets/attachments. Mind you, I always learn oodles more from these types of responses, so thanks to all who go above and beyond in answering the question and showing more uses. You saw the forest from the trees!
Ciao
---
BTW, from our internal Mathcad collab
Quote

This 5-Part set of linked Mathcad sections is intended both for use as a project design template and as a training tool.

1 users liked this post
ioan92 2/3/2016 2:49:00 AM
  • New Posts New Posts
  • No New Posts No New Posts