Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Display Fractions in Tables

amt_hellas

New member
I have a drawing format which has a table to include some family table columns as entries. One shows its dimension as fractional
 
Anthony,



I think you need to change the dimension to a fraction, then it updates anywhere that dimension was used.



I cannot be sure about this, but I have done this in the past and it worked.



Use the Show / Erase dialog to place the dimension in a view.
Then, right click the dimension and change it from decimal to
fractional. Then use the same dialog box to Erase it.



Now, add it to the table to see if it changes to a fraction.



I noticed this in my part, where I changed dimensions to fractions on a
drawing and my part displays them as fractions in Part Mode. Once
you can see it as a fraction in part mode, you should be able to see it
as a fraction in the table.



I may be wrong, but this method worked for me in the past.



Also, make sure the dimension is not a parameter reference. I believe it has to be a dimension to show up as a fraction.



Jim
 
Jim,


Thanks for the help. The cell entry was a parameter reference, so I just changed it to be the actual dimension and now it seems to be working well.
 
Great. I have an Engineer here that wants me to change a schedule
to all fractions, but I have parameter references throughout. I
got my work cut out for me.
 
You can create a report relation as below...


Resolution

-----------------

Assuming that the base denominator will be 8 and that the number
parameter 'length' exits in all parts, the following repeat region
relation may be created:



denom_base=8

rep_param=asm_mbr_length

whole=floor(rep_param)

fraction=(rep_param-whole)*denom_base



if (fraction==0)

text=(itos(floor(whole)))
</pre>
else

if (((fraction/4)-floor(fraction/4))==0)

if whole > 0
text=(itos(floor(whole))) + " -" + (itos(floor(fraction/4))) + "/2"
else
text=(itos(floor(whole))) + (itos(floor(fraction/4))) + "/2"
endif
</pre>
else

if (((fraction/2)-floor(fraction/2))==0)

if whole > 0
text= (itos(floor(whole))) + " -" + (itos(floor(fraction/2))) + "/4"
else
text= (itos(floor(whole))) + (itos(floor(fraction/2))) + "/4"
endif
</pre>
else

if whole > 0

text=(itos(floor(whole))) + "-" + (itos(floor(fraction))) + "/8"
</pre>
else

text=(itos(floor(whole))) + (itos(floor(fraction))) + "/8"
</pre>
endif

endif

endif

endif



After creating the relation, replace the parameter asm.mbr.length with
rpt.rel.text. The relation may be modified such that the base is 16 if
desired. Note: Rounding will occur on the number parameters. Check each
fraction to ensure that it is the desired value.
 
A few things PTC could do to make me love them.



1. Create a RTOS (Real Number to String) function.



2. Allow user defined functions in Relations.



3. Allow FOR loops. Or ANY looping would be nice.



I have used the above method to create string parameters that hold real
number values. It can be a pain though, and since there are no
functions, you need to do this everytime you need another string
parameter.



The report relation would make it a little easier, as it works sort of
like a function. But if you need to create a Real Number string
in many parts, it is a pain.



Thanks for the tip.
 

Sponsor

Back
Top