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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Family table decimal place question

axu
1-Visitor
1-Visitor

Family table decimal place question

Hi guys I need some help with changing dimensions in family table instances for an UDF I'm making

In the following picture you can see that I have created a family table with different instances and 4 dimensions that will vary depending on which instance is chosen.

FamilyTable.PNG

The thing is that for the _FLANGES instances, I need dimensions D41 and tp41 to be to 3 decimal places, such that 10.95 should actually be 10.945 and 13.56 for 13_BOTTOM_FLANGED should be 13.560.

I can set the dimension in question to be always to 3 decimal places, however that won't work for me because the dimensions need to be to 2 decimal places for the NOT_FLANGED instance. I also tried just entering the dimensions to correct decimal places in the family table boxes, however that does not seem to affect anything and when used the generated dimensions will be to the decimal places of the original feature.

So my question is how would I make this variation in decimal places for different instances possible in UDF?

Thanks,


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
ACCEPTED SOLUTION

Accepted Solutions
James62
12-Amethyst
(To:axu)

Assuming these values in your table are all coming from driving dimensions, You can define additional driven dimensions over the existing driving dimensions and give these new dimensions different properties, such as the number of decimals, etc.

It'll be basically just parameters being derived from another ones. How to then define the table is another story.

View solution in original post

6 REPLIES 6
dschenken
21-Topaz I
(To:axu)

I don't think so and here's why - the dimension characteristics are stored with the dimension and not with outside tables. These characteristics aren't limited to the number of places; font, color, height would all be candidates for making the table a complicated mess, so I think PTC won't do anything about it.

I believe you can add the dimension tolerance parameters to the table. I presume the reason for controlling the number of digits is to control the tolerance.

axu
1-Visitor
1-Visitor
(To:dschenken)

Thanks for replying,

Yes I want to have tighter (3 digit) tolerances for the FLANGED dimension d41. I see that I cannot do it the way I thought it would go, but what do you mean by dimension tolerance parameters?

I see that there is an option to add parameters in family table however I'm not sure how can they help me achieve my goal with this UDF, I'm not very good at relations...

I also see a var parameter option in the UDF menu, but nothing happens when I click it 😕

dschenken
21-Topaz I
(To:axu)

change the dimension tolerance properties to plus-minus or +/- symmetric and then Switch symbols to see the tolerance parameters, tpm,and tm

James62
12-Amethyst
(To:axu)

Assuming these values in your table are all coming from driving dimensions, You can define additional driven dimensions over the existing driving dimensions and give these new dimensions different properties, such as the number of decimals, etc.

It'll be basically just parameters being derived from another ones. How to then define the table is another story.

axu
1-Visitor
1-Visitor
(To:James62)

Can I somehow change the decimal places of driving dimensions through relations? If that is possible I could so some IF flanged=true THEN d41=3 decimal places kinda thing.

I tried things like d41 = floor(d41,2) but that's silly cause it's circular coding, or i guess i could derive driven dimensions from d41 but the people I work with don't like fake/driven dimensions

James62
12-Amethyst
(To:axu)

Yeah, you can just make a copy of the d41

copy_of_d41 = d41

d41_two_dec = floor(copy_of_d41,2)

This is a pretty rough code. Make sure that the d41 exists first using some if else statements.

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags