widget name

widget name

peterquRXR7S
Advocate Advocate
673 Views
4 Replies
Message 1 of 5

widget name

peterquRXR7S
Advocate
Advocate

peterquRXR7S_0-1650550612429.png

I want to know the depth.  I made this program. But it doesn't work.

 

real $d= $widget("SFDrilling.Shell.SWDrilling.Depth").value
print $d

0 Likes
Accepted solutions (2)
674 Views
4 Replies
Replies (4)
Message 2 of 5

cfastNJWK6
Advisor
Advisor
Accepted solution

I don't know why PowerMILL says there is no parameter associated with that field...Try this instead:

$toolpath.drill.depth.value

cfastNJWK6_0-1650552349634.png

 

Message 3 of 5

peterquRXR7S
Advocate
Advocate

Thank you! it works

Message 4 of 5

kevin.hammond3WX4X
Advocate
Advocate
Accepted solution

It may be handy to know that you can read widget values too.

I use this as part of a check that the drill tool pitch and tapping pitch are correct as occasionally the toolpath didn't pick up the tool pitch.

 

If ($tl.type == "tap") {
FORM TOOL ;
$pitch = $widget("pmlTappingTool.Shell.TPGeom.Geometry.Pitch").value
If ($pitch == "0.0") {
$pitch = "!*Error*"
}

 

 

regards Kevin

Message 5 of 5

peterquRXR7S
Advocate
Advocate
Thank you Kevin! This is a very good knowledge for me.
0 Likes