## Recommended Posts

Hello,

kindly help me. To detect the number hole to selected in drilling  & angle between the hole.

Is there any parameter or std. variable for no. of hole & Angle between them

```row_holes : 1
fmt "T" 4 row_holes```
```pdrlcommonb
if yinc,
[
*row_holes e\$
pfxout pfyout
row_holes = 1
]
else,
[
row_holes = row_holes + 1
]
pcom_movea``` ##### Share on other sites

The number of entities in an operation is stored in parameter 15083.

Are you talking about the angle between holes in 3D space or the XY plane?

For 3D space you'll need to determine the vector of a hole, then use the below formula to determine the angle.

If you want the angle between holes in the XY plane atan2 should work.

##### Share on other sites

how I can implement the formula?

##### Share on other sites

you can use the dot3 MP function.

result = dot3(a,b)

where a and b are the first variable of two different unitized 3D vectors. In this case you will want to use the tool vectors of the two drill points you want to measure in between.

since the vectors are unitized, the denominator of the formula above will collapse to 1.

Thus the angle between would be the cosine of result.

• 2

##### Share on other sites

Thank you, #Alex it's working...

• 1

## Create an account

Register a new account