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.

adding dims to description

bfairhurst

New member
I have searched past topics and found some good examples,


C1 = ITOS(C)
Following is for C (C1) dim.
X2 = C
Y2 = FLOOR(X2)
Z2 = (X2-Y2)*100
IF Z2 == 0
C1 = ITOS(Y2) + .00
ELSE
C1 = ITOS(Y2) + . + ITOS(Z2)
ENDIF



this is what I found, it appears this is if your dimension is greater than 1.0, I have some dimensions that will be less than 1.0. For example 0.250 I have been struggling to make this work. Is this possible. Thanks!
 
Here is what worked for me! This is for the height, I repeated this for the width, length & thickness. Just change the parameters and dim #.


H = floor(d1, 0)
H1 = d1 - H
H2 = H1*100


IF H1 < .1
H3 = ".0" + ITOS(H2)
ENDIF


IF H1 >= .1 & H1 < 1
H3 = "." + ITOS(H2)
ENDIF


IF H1 == 0
H3 = ".00"
ENDIF


HEIGHT = ITOS(H) + H3
 

Sponsor

Back
Top