Optional flag with ManualNC

Optional flag with ManualNC

davidGLA8P
Enthusiast Enthusiast
362 Views
2 Replies
Message 1 of 3

Optional flag with ManualNC

davidGLA8P
Enthusiast
Enthusiast

I'm trying to figure out how, inside a post-processor to detect that the optional property has been set on a ManualNC.  It doesn't seem to work in the same way as for machining operations.

 

For example, if I add a Manual NC and set the operation type to 'Measure tool', there does not seem to be a corresponding call to onSection() for that operation.  Instead, there is just a call to onCommand with 

COMMAND_TOOL_MEASURE
 
Calling currentSection.isOptional() at that point doesn't yield the correct result as it seems to return the optional flag for either the preceding or following operation.
 
Does anyone know how to get access to this property?
 
0 Likes
Accepted solutions (1)
363 Views
2 Replies
Replies (2)
Message 2 of 3

denis_q
Advocate
Advocate
Accepted solution

It probably won't work that way.

 

https://forums.autodesk.com/t5/hsm-support-forum/optional-quot-manual-nc-quot/m-p/8429534#M22838

 

The ManualNCs also annoyed me for a long time.

 

https://forums.autodesk.com/t5/hsm-support-forum/multiple-setups-reorder-tools-random-repositioning-...

 

At some point I then switched to the operation notes:

 

if (section.hasParameter("notes")) {
    var notes = section.getParameter("notes");
    if (notes) {
        var lines = String(notes).split("\n");
...

 

0 Likes
Message 3 of 3

davidGLA8P
Enthusiast
Enthusiast

Many thanks for those links.  The first basically confirms that there's no way to do this.  Not helpful at all to have elements of the UI that are of no possible use.

 

The 2nd link raises another point.  I always tend to assume that 'Check tool' refers to the operation that's just been completed, whereas measure tool would happen before the following operation.  To have both of those cases handled correctly when re-ordering ops would require you to be able to indicate binding of a Manual NC to either the previous or following operation.

 

A clear statement somewhere in the documentation of how these things are supposed to be handled would help.

 

 

0 Likes