Using Assign & Labels - Auto Updating Comment

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using Assign & Labels - Auto Updating Comment

    Hi folks,

    Apologies if this query is answered in a previous post, I did look, honest.
    I may have been using the wrong search terms.

    I'm having issues with a variable inspection program I'm writing.
    I'm using something along the lines of (see below)

    C100 =COMMENT/YESNO,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,
    DO YOU WISH TO CHECK LIST A FEATURES
    ASSIGN/V1=C100.INPUTVALUE
    IF_GOTO/V1==1,GOTO = L1
    IF_GOTO/V1==2,GOTO = L2
    L1 =LABEL/


    L2 is then further down the program where a second YESNO request is inserted so we can jump past other features that we don't want measure or report, which we click yes or no on can vary greatly dependant on the part.

    My issue is that when I'm placing multiple of these (what I will call) Jumpers, I'm seeing that sometimes the Labels or the C100.inputvalue is changing automatically on ones I have already placed.

    Which means I have to go back to the YESNO's in my program and manually change them back to what they were when I put them there.
    So if I say that the example used above is C100, when I add a few more that original C100 changes to C101, C102, C103 etc, based on how many more I insert.

    Not too much of a problem when I have two or three but more than a little frustrating when I have 12 of them.

    Is there an auto index setting I'm missing?

    Thanks in advance

    Jason

  • #2
    Why not do it like this
    C100 =COMMENT/YESNO,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,
    DO YOU WISH TO CHECK LIST A FEATURES
    IF_GOTO/V1=="YES",GOTO = L1
    IF_GOTO/V1=="NO",GOTO = L2
    L1 =LABEL/

    Comment


    • louisd
      louisd commented
      Editing a comment
      you mean this ? V1 isn't defined
      C100 =COMMENT/YESNO,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,
      DO YOU WISH TO CHECK LIST A FEATURES
      IF_GOTO/C100=="YES",GOTO = L1
      IF_GOTO/C100=="NO",GOTO = L2
      L1 =LABEL/

    • JayKin
      JayKin commented
      Editing a comment
      Sometimes the simpler way is the best way, I'll give that a try.
      It would save messing around with assignments if it works, thanks!

      Update -

      Worked a treat, save me mucking about with V's so I'm all for that.

      Thank you
      Last edited by JayKin; 05-23-2019, 09:22 AM. Reason: update

  • #3
    louisd : In the first post, V1=C100.INPUTVALUE...... I think C100.INPUT is enough !

    Comment


    • mckenzie
      mckenzie commented
      Editing a comment
      i thought if it was an input comment .input is correct. if its a yes/no comment then .inputvalue is required because the output is either a 1 or a 2

    • louisd
      louisd commented
      Editing a comment
      yeah, if op retains v1 it works. @BKulpa's post excluded assigning V1 from the code example. yeah, I missed ".input" I wasn't sure if .input worked on yes/no comments, but it does. it results in script text "YES" or "NO". didn't know about ".inputvalue" until now. thanks mckenzie!

  • #4
    Originally posted by JayKin View Post
    My issue is that when I'm placing multiple of these (what I will call) Jumpers, I'm seeing that sometimes the Labels or the C100.inputvalue is changing automatically on ones I have already placed.
    Do you create the commands by going through the menu, or copy&paste? I've noticed a couple of times lately, that when using copy&paste the new copy isn't always a 'deep copy', but retain internal links to the original. I've never seen that behavior when creating commands through the menu.

    AndersI
    SW support - Hexagon Metrology Nordic AB

    Comment


    • JayKin
      JayKin commented
      Editing a comment
      Yes copy & paste, that could be a good shout.

      I'll do some testing.

Related Topics

Collapse

Working...
X