|
23.10.2004 11:11:06
|
 katrina71 Posts 4
|
Anyone know of a way to retrieve the actual value of a linear dimension via CADL? I can get the upper and lower tolerance with @diminfo2[4] and [5].
Also, is it normal that all upper and lower tolerances are 0.001 by default? If you use @diminfo2[4] on a dimension without tolerances applied to it, it returns 0.001.
I want to analyze the sum total of all upper tolerances for a group of dimensions, but these 0.001 values will give me unreliable results for sure. Should I exclude dimensions without tolerancing from the selection set?
Thanks.
--
|
|
23.10.2004 11:12:38
|
 CKDExpert Posts 131
|
The actual value is retrievable for llinear dimensions by looking at @refln[0][0] thru @refln[0][5]. Linear dimensions always measure along their X-Axis, so a difference of their X values will get you the desired result.
Yes, it is normal that the default values for the tolerances are 0.001. If you look in the Detail Settings dialog you will see that there is a value for the upper and lower tolerance even when None or Basic is selected as the tolerance type.
You will have to check the dimensions tolerance flag, @diminfo1[6], and exclude those that are either Basic or None to get the summation you want.
|
|
23.10.2004 11:13:17
|
 katrina71 Posts 4
|
After playing with @refln a little, it seems that the dimension value is always stored in @refln[0][5]. When you try to take the difference of the two X's, you get inaccurate results. I'll build my code based on @refln[0][5].
Thanks.
--
|
|
23.10.2004 11:14:19
|
 CKDExpert Posts 131
|
Interesting. [0][5] should be the Z value of the end of the reference line. [0][3] should be the X value and therefore, the value.
Do you have a small sample you could send in so we can see why taking the difference is giving inaccurate results? Sounds like there's a bug in there somewhere that we might be able to ferret out.
|
|
23.10.2004 11:16:53
|
 katrina71 Posts 4
|
Here's a snippet from my code...
clear int numselected
maskentity 11
gensel "Select the dimensions", numselected sprint $numdim,"%d dimensions analyzed",numselected pause "%d dimensions found",numselected
:nextdim getnext if (@error==1) exit
if (@diminfo1[6]!=2) exit
pause "Dimension Values: %f",@refln[0][5] totaldim = totaldim + @refln[0][5]
In this case, the last 'pause' statement calls out the dimension value using [0][5]
--
|
pages:
1 |