Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Showing the underlying equations 3

Status
Not open for further replies.

LarsBlesvik

Petroleum
Oct 12, 2011
5
Hi all,

When working with code checks there are often multiple formulas given a set of variables. For instance DnV (Norwegian certification agency) gives a resulting sling force with one padeye as:

RSF:=1.4*F

Whereas with 2 to 4 padeyes it would be:

RSF:=1.2*SKL*PL*F/cos(v)

There is no problem in writing an if statement to choose the correct value, but when presenting a report on this I would like to be able to write the if statement off the printed area, and still get the symbolic result presented, something like this:

n:=4

(hidden)

RSF:=if(n=1,1.4*F,1.2*SKL*PL*F/cos(v))

(hidden end)

RSF=1.2*SKL*PL*F/cos(v)=Numerical value

This would make it possible for me to generate a less "cluttered" report to present.

Any ideas?
 
Replies continue below

Recommended for you

Why don't you just use Insert->Area and hide it in there?
 
@Occupant: The challenge has not been to keep the calculations hidden, but to get the end result displayed correctly :)

@jghrist: thanks for a nice looking suggestion, it looks like a good way of doing it, but it still isn't able to display the solution formatted as an equation, is there any way of doing that?
 
it looks like a good way of doing it, but it still isn't able to display the solution formatted as an equation, is there any way of doing that?
Not that I know of. You might try fooling around with bitmap images and different control objects.
 
Have to add: the only fly in the ointment with my approach is that you have to use refresh every time you change n.
 
@Occupant: Can you post the mathcad version of that last one?

Lars
 
@Occupant: Thanks a lot for your help so far, but I am seriously baffled by this. I try to replicate your calculation, but instead of symbolics, all variables are exchanged for numbers, is there any hidden preference or keyword I can't see in this?
 
The key is to not define the independent variables before the dependent variable is defined. Variables that are defined (like n) are evaluated and not shown in the symbolic result.

Notice that in Occupant's attachment, v, SKL, PL, and F are defined after the (hidden) RSF formula.
 
Thanks a lot everybody! It worked out pretty neat!

Just a quick extra question: Anybody know WB script to change textbox colour and appearance?

Lars
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor