hexagon logo

Displaying ref length.

I have a projected tol zone and am using legacy dim. 

Is there any way to add the length used for both position and perp to the report? 

I realize I could do a report command, but want to future proof it in case someone comes in and changes my code.

Parents
  • Unsure how it would work with legacy, but you could add a variable to control the length tolerance, which could be pulled into a report comment automatically and displayed. 

  • For a Geometric Tolerance command, the reference length is displayed as part of the feature control frame anyway so there's no need for an additional comment...

    For legacy dimensions, it can be done like this..

    DIM PERP1= PERPENDICULARITY OF CYLINDER CYL1,RFS TO PLANE PLN1,RFS EXTENDLENGTH=1.500  UNITS=MM ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH
    AX    NOMINAL       +TOL       -TOL       MEAS        DEV     OUTTOL
    M        0.000      0.010      0.000      0.000      0.000      0.000 #--------
                ASSIGN/V1=GETTEXT(173,0,"PERP1")
                COMMENT/REPT,
                "Projection reference length: "+V1

  • What is the meaning of the 173 and 0 for the gettext method?

    Answered my own question, it is the data field number. I have experience with basic, but it has been a long time.

    Thanks!

  • What is the meaning of the 173 and 0 for the gettext method?

    Answered my own question, it is the data field number. I have experience with basic, but it has been a long time.

    Correct, 173,0 is the data field reference.  You can find this by setting the edit window to display command mode and then right click to bring up this menu...

    One you've changed the popup display to show data type information, you can hover over the various parameters of a command and it will show you the relevant details...

    There are two ways of using this information.  I could have used the text reference: ASSIGN/V1=GETTEXT("DIM_LENGTH",0,"PERP1"), but I chose to use the numeric reference: ASSIGN/V1=GETTEXT(173,0,"PERP1") instead.  The advantage of using the numeric reference is that it will work for any language whereas text strings are language specific.

Reply
  • What is the meaning of the 173 and 0 for the gettext method?

    Answered my own question, it is the data field number. I have experience with basic, but it has been a long time.

    Correct, 173,0 is the data field reference.  You can find this by setting the edit window to display command mode and then right click to bring up this menu...

    One you've changed the popup display to show data type information, you can hover over the various parameters of a command and it will show you the relevant details...

    There are two ways of using this information.  I could have used the text reference: ASSIGN/V1=GETTEXT("DIM_LENGTH",0,"PERP1"), but I chose to use the numeric reference: ASSIGN/V1=GETTEXT(173,0,"PERP1") instead.  The advantage of using the numeric reference is that it will work for any language whereas text strings are language specific.

Children
No Data