cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

How can i perform a Rowbreak like in MIcrosoft Word

sm�ller-2
11-Garnet

How can i perform a Rowbreak like in MIcrosoft Word

Hey guys,

due to my complicated and long Calculation i need to perform certain rowbreaks, so that i can print it on "A4" otherwise i would need "A2" format.

Now i have the problem that i dont know how i can perform a "Rowbrake"

As seen in attached picture...

Is that possible?

Thx guys

25 REPLIES 25

I need that rowbreaks in my for and while loops aswell

LucMeekes
23-Emerald III
(To:sm�ller-2)

Seems like you're using Mathcad 15, which is good because in Prime it's not possible to do:

Which you obtain by pressing [CTRL-ENTER] instead of +.

Note that you can only break an expression at a summation point.

Success!
Luc

As a crude workaround you may insert "program" lines consisting of empty strings ( -> "" ) when a program runs over a page break to avoid your program gets unreadable.

The only way to insert a linebreak which Mathcad offers is when entering a long sum via "Ctrl" and "Enter"

This will not work with your chain of logical expression. You will have to use abbreviations as workaround.

Something like

bool1 <-- IsOK(a,b) AND IsOK(c,d)

bool2 <-- IsOK(e,f) AND IsOK(g,h)

"OK" if bool1 AND bool2

"NOK" otherwise

In your special case I would not use and call IsOK in the IsOK_all routine at all. And you may use simple argument names in IsOK_all rather than using the names you intend to call this function later. Like you used "ist" and "soll" in IsOK.

WE

How about one of these two options?

sm�ller-2
11-Garnet
(To:MJG)

hmm ok and is it possible to break the hole loop so that it looks like that:

Iter FA.....:   ---- Rowbreak

Loop

MJG
18-Opal
18-Opal
(To:MJG)

Here is another option:

You would replace the numbers with your actual checks. For example, change 1<2 to IsOK(dm,am)="OK"

hmm ok thx not working now .... its kinda annoying

The problem is writing only with numbers and separating one condition into 2 or 3 separat is not good for understanding the hole part

Next problem of formating.

How to put it in A4 format  lol?.

Unfortunately, with the exception of the addition operator, you can't automatically break lines in Mathcad 15 (and below).

There are several methods of getting round the problem, which usually take up more vertical space (I assume that's less of a problem?).

The first thing you can try is reducing the size of your standard font - that may squeeze a few expressions into the page,

The second thing (which I assume you've either done or don't want) is to use Landscape mode.

Then you enter the realm of modifying your expressions to use less horizontal room.   For example, ..

  • Put your function arguments into a vector and either re-assign to the variables within the function or modify your function to pick the appropriate elements from the vector.
  • Break up long expressions manually and piece them back together again on separate lines.

See this image for some examples:

Stuart

LucMeekes
23-Emerald III
(To:sm�ller-2)

You're wasting a lot of space with your IsOK function.

Using it every time and checking if the output is equal to the string "OK" or "NOK" wastes more.

Why not have the function produce a logic TRUE or FALSE automatically by defining it as:

Then you can just test:

But even that takes more (horizontal) space than the simple and clear:

Success!

Luc

ae what do you mean.

Hmm i think my mathcad knowledge is limited

OO seems to be more complicated than writing my loop

Thx

LucMeekes
23-Emerald III
(To:sm�ller-2)

And also you could turn your evaluation method around, in returning when a condition is NOT met. So instead of:

You do:

Success!
Luc

but the condition is saying

OK if all conditions are OK

shouldnd i need to write

return "NOK" if a not equal b and c not equal d

LucMeekes
23-Emerald III
(To:sm�ller-2)

Exactly that's what I'm proposing. OK (only) if all conditions are OK, so if only one if them is not OK, then it's already NOK.

Luc

Here are a few more

But I noticed that your IsOK_all has an odd number of arguments?

WE

odd number what do you mean?

Maybe I was wrong but I counted 17 on first sight.

Maybe my old eyes need some rest

thats my conditions so far

2 more added today for "Pipe"

Odd number year maybe because i use the SHG 2 times

condition:

ISOK(SHG;Sfg1.g)

ISOK(SHG;Sng2.5)

Right counted but its that what i need to

> Right counted but its that what i need to

Sure, but what we saw from your partial screenshot was:

You compare the first argument with the second, the third with the fourth, the 5th with the 6th, ....., the15th with the 16th and then the 17th with ???

The reason may quite well be the double usage of one of the arguments and so you have to adopt the solutions posted so far accordingly.

Anyway. What you have learned from this thread ist, that there is no easy, built-in way to make your lines shorter by some sort of automatic or manual line breaks. You have to put in some work to achieve what you want.

WE

a ok i see just for explanation:

i forgot the condition ISOK(SRO;SFO)

Because of the variable SFO is the seventh variable i just added the new condition ISOK(SRO;SFO) and wrote SRO at the end of the variables.

Hm how does this affect the hole condition ?

I hope that the order on the left side is not relevant for the endresult of the condition 😞

Anyway. THx for all the Tips.

I rechecked the condition. Seems to be correct.

Anyway. SRO is the last because of that i have forgotten the condition.

And i needed to doubleuse SHG but with 2 different maxvalues

> Hm how does this affect the hole condition ?

The order of the arguments does not matter, as log as you respect it when calling the function.

But you can insert the missing parameter in any position you feel more appropriate. Put the cursor there, add a comma and write the argument name.

thx!

Top Tags