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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Printing types of inner thread inserts/programming

Remus
11-Garnet

Printing types of inner thread inserts/programming

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.

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:Werner_E)

In case you'd like to stay with your solution, you may simply try this:

Werner_E_0-1612195168719.png

 

View solution in original post

15 REPLIES 15
Werner_E
25-Diamond I
(To:Remus)

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:

Werner_E_0-1611856104844.png

P.S.: You may consider using units in your table(s). That's something that Prime can deal with pretty good.

 

Remus
11-Garnet
(To:Werner_E)

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:

insert.JPGsupport.JPG

 

It will be also good to know how to solve this problem by you way  

 
 
 
 
Werner_E
25-Diamond I
(To:Remus)

How about a more streamlined and general function which you can use for an arbitrary number of inserts?

Werner_E_0-1612188266039.png

Prime 5 worksheet attached

Werner_E
25-Diamond I
(To:Werner_E)

In case you'd like to stay with your solution, you may simply try this:

Werner_E_0-1612195168719.png

 

Remus
11-Garnet
(To:Werner_E)

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

Remus
11-Garnet
(To:Werner_E)

Hei, 

 

I have problem with printing values from both matrices, i tried to check in solutions but couldn't find similar.

RK_9798554_0-1612341825777.png

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.

Werner_E
25-Diamond I
(To:Remus)

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:

Werner_E_0-1612356127853.png

Personally I'd prefer turning the program into a function:

Werner_E_1-1612356192440.png

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:

Werner_E_2-1612356340253.png

 

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:

Werner_E_3-1612356494454.png

 

I am not sure what you mean with "so i need to print both of list...." but maybe making a table comes handy:

Werner_E_0-1612357002682.png

 

 

P6 worksheet attached (sorry, I forgot that you are using P5 and PTC provides no way to save in P5 format from P6)

 

 

 

 

 

 

LucMeekes
23-Emerald III
(To:Werner_E)

That can be solved. See attached.

 

Success!
Luc

Werner_E
25-Diamond I
(To:LucMeekes)

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.

Remus
11-Garnet
(To:Werner_E)

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

Werner_E
25-Diamond I
(To:Remus)

I am not sure about the tables you would like to see.

See if the attached P5 file helps with the other questions

Remus
11-Garnet
(To:Werner_E)

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!

Werner_E
25-Diamond I
(To:Remus)

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?

Remus
11-Garnet
(To:Werner_E)

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)

RK_9798554_0-1612541778090.png

 

Additionally I think I need inform what is required/minimum amount of parts (insert,support, anchor) some how (either in table or separately)

RK_9798554_1-1612541956329.png

I hope now everything clear. 🙂

 

LucMeekes
23-Emerald III
(To:Remus)

Use:

return "text".

to return the string "text".

You can also assign a string to a variable:

M := "Text"

M = "Text"

 

Success!
Luc

Announcements

Top Tags