hexagon logo

Variables for Depth and Sample Hits Spacer

Hey all,

I've been playing around with assign statements and all that in my programs, and I was looking in the F2 Expression menu, and I was trying to find the correct segments to make a variable statement with depth or spacer/indent, etc.

I know you can do stuff like CR1.Z /CR1.TZ and the like. But I could not find one for the other parameters for circles.

Is there such a variable statement for depth without hard coding the value in the expression? Like Depth(CR1.Z-CR1.TZ)
Parents
  • Here is an example using GETCOMMAND and GETTEXT

    Circle command information: CIRCLE (CONTACT) (612)
    Depth Data Type information: Depth (F_DEPTH - 78), 0

    CR_1         =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
                  THEO/<4.4461,-22.507,0>,<1,0,0>,4.8552
                  ACTL/<4.4461,-22.507,0>,<1,0,0>,4.8552
                  TARG/<4.4461,-22.507,0>,<1,0,0>
                  START ANG=5.7537,END ANG=72.4129
                  ANGLE VEC=<0,0,-1>
                  DIRECTION=CCW
                  SHOW FEATURE PARAMETERS=NO
                  SHOW CONTACT PARAMETERS=YES
                    NUMHITS=5,DEPTH=0.0787,PITCH=0
                    SAMPLE METHOD=SAMPLE_HITS
                    SAMPLE HITS=0,SPACER=0
                    AVOIDANCE MOVE=BOTH,DISTANCE=0.3937
                    FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
                  SHOW HITS=NO
                  ASSIGN/CR1_DEPTH1=GETTEXT(78,1,GETCOMMAND(612,"UP",1))
      $$ NO,
                  "Depth value: "+CR1_DEPTH1
                  "Comment and variable output will be 0.0787"​
    



    From the 2021.1 Help file:
    Link: https://docs.hexagonmi.com/pcdmis/2021.1/en/helpcenter/index.htm?rhcsh=1&rhnewwnd=0#t=mergedProjects%2Fco re%2F26_expression_topics%2FString_Functions.htm&r hsearch=gettext&rhhlterm=gettext&rhsyns=%20

    GETTEXT

    ASSIGN/V1=GETTEXT("Best Fit Math Type",0,{F15}) - This command assigns V1 the current value of the best fit math type toggle of feature F15.

    ASSIGN/V2=GETCOMMAND("Comment","TOP",1) - V2 is assigned a pointer to the first comment from the top of the measurement routine.

    ASSIGN/V3=GETTEXT("Comment Type",1,V2) - V3 is assigned the value of the Comment Type toggle field. If the first comment in the measurement routine is a comment to be displayed to the operator, the value of V3 will be the string "OPER".​
Reply
  • Here is an example using GETCOMMAND and GETTEXT

    Circle command information: CIRCLE (CONTACT) (612)
    Depth Data Type information: Depth (F_DEPTH - 78), 0

    CR_1         =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
                  THEO/<4.4461,-22.507,0>,<1,0,0>,4.8552
                  ACTL/<4.4461,-22.507,0>,<1,0,0>,4.8552
                  TARG/<4.4461,-22.507,0>,<1,0,0>
                  START ANG=5.7537,END ANG=72.4129
                  ANGLE VEC=<0,0,-1>
                  DIRECTION=CCW
                  SHOW FEATURE PARAMETERS=NO
                  SHOW CONTACT PARAMETERS=YES
                    NUMHITS=5,DEPTH=0.0787,PITCH=0
                    SAMPLE METHOD=SAMPLE_HITS
                    SAMPLE HITS=0,SPACER=0
                    AVOIDANCE MOVE=BOTH,DISTANCE=0.3937
                    FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
                  SHOW HITS=NO
                  ASSIGN/CR1_DEPTH1=GETTEXT(78,1,GETCOMMAND(612,"UP",1))
      $$ NO,
                  "Depth value: "+CR1_DEPTH1
                  "Comment and variable output will be 0.0787"​
    



    From the 2021.1 Help file:
    Link: https://docs.hexagonmi.com/pcdmis/2021.1/en/helpcenter/index.htm?rhcsh=1&rhnewwnd=0#t=mergedProjects%2Fco re%2F26_expression_topics%2FString_Functions.htm&r hsearch=gettext&rhhlterm=gettext&rhsyns=%20

    GETTEXT

    ASSIGN/V1=GETTEXT("Best Fit Math Type",0,{F15}) - This command assigns V1 the current value of the best fit math type toggle of feature F15.

    ASSIGN/V2=GETCOMMAND("Comment","TOP",1) - V2 is assigned a pointer to the first comment from the top of the measurement routine.

    ASSIGN/V3=GETTEXT("Comment Type",1,V2) - V3 is assigned the value of the Comment Type toggle field. If the first comment in the measurement routine is a comment to be displayed to the operator, the value of V3 will be the string "OPER".​
Children