Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hi,
I have problem with printing name (types inner inserts) from tables (values picture). I have 2 values which are not in tables: N.Ed=31kN and V.Ed=35kN and then analogues/relatives values from tables N.Rd and V.Rd in columns. So i need to print all names from (vakuankkuri) column which are meet the conditions:
~N.Rd>N.Ed/2 and V.Rd>V.Ed/2
I have already ideas with matrix (picture matrix tables) but don't know how to solve this problem by right programming/looping. Thanks for advices.
Solved! Go to Solution.
In case you'd like to stay with your solution, you may simply try this:
Please attach your worksheet.
And if you don't use the latest version of Prime (which is 6), tell us so, as otherwise you won't be able to read the files which may be posted as answers.
From what I understand, a function like the following should do the job:
P.S.: You may consider using units in your table(s). That's something that Prime can deal with pretty good.
Hi,
I coudnt answer before because i had problem with PTC community website.
Im using Mathcad prime 5 and I did solve this problem in another way. In my opinion also works but i need to add some comments which I dont know yet.
How i can add output text: 'need more insert/supports per element' if i dont how now types printed:
It will be also good to know how to solve this problem by you way Werner_E
I also attached my solution. Waiting for tips.
How about a more streamlined and general function which you can use for an arbitrary number of inserts?
Prime 5 worksheet attached
In case you'd like to stay with your solution, you may simply try this:
Thanks man, i did have before programming classes, but seems that a lot forgotten since I changed field to construction engineer. I know my solution its not so practical and i will change for your solution, its more clear. Hopefully I can manage to finish my Theseus without straggling. I have feeling I will need some more advices in the final stage of calculations when I need compare all parts to choose right types of products for precast support. Werner_E I own you a beer man!!! Thanks for support
Hei,
I have problem with printing values from both matrices, i tried to check in solutions but couldn't find similar.
so i need to print both of list....
And also I dont know hot to print error if numbers are not 1 to 4 (1..4)
Attachment mathcad 5.
You may use a couple of nested if .. elseif to deal with that, but i guess its easier to use the return statement which quits the program immediately:
Personally I'd prefer turning the program into a function:
It may be useful to make a vector of all possible output matrices first and use this vector to chose the appropriate matrix simply via vector index. Again I'd prefer a functional approach:
And as you have a similar problem a second time in your sheet, why not use a function with two arguments to deal with both of them and also all other similar situations which may come along:
I am not sure what you mean with "so i need to print both of list...." but maybe making a table comes handy:
P6 worksheet attached (sorry, I forgot that you are using P5 and PTC provides no way to save in P5 format from P6)
That can be solved. See attached.
Success!
Luc
Oh yes, I vaguely remember that you had found a way to do that kind of conversion.
Thanks for converting my worksheet - hope it helps @Remus to solve his problem.
HI,
First part of solution I got it and fix it, but second I think I need some more guide. I think i didnt explain proper way what I really need to do, so I decided to send whole calculation and explain step by step. You can only read blue comments and then on the end of worksheet I showed my comments and explanation, hope based on this information its possible to print correct results/table. Hope is not to challenges.
Greetings
I am not sure about the tables you would like to see.
See if the attached P5 file helps with the other questions
HI,
First solution works great.
About tables I explained as good as I could. In any question write me.
With tables whole calculation will looks much more better.
Have a nice weekend!
Just to b sure that I understand what you are after:
The only user input to the whole calculation sheet are F.Ed1 and V.Ed1
The number of inserts, supports and anchors is always the same, either 2,3 or 4?
The end result should be one table which shows the options for the smallest amount of inserts/supports/anchors?
HI,
Yeah the only user input are forces F.Ed1 and V.Ed1. ->YES
The number of inserts, supports and anchors is always the same, either 2,3 or 4-> YES
The end result should be one table which shows the options for the smallest amount of
inserts/supports/anchors->YES
And also i need to be inform manufacturer of inserts and choice for anchors (but its not uset input)
Additionally I think I need inform what is required/minimum amount of parts (insert,support, anchor) some how (either in table or separately)
I hope now everything clear. 🙂
Use:
return "text".
to return the string "text".
You can also assign a string to a variable:
M := "Text"
M = "Text"
Success!
Luc