hexagon logo

passing text in a comment to script variable?

Does anyone know how to pull the text out of a report comment feature and into a variable in the basic script editor?
Parents
  • The problem is to know WHICH report comment contain the value you are looking for in the program?

    It would be a smarter solution to cast the text into a variable (just like you already thought of doing) because the variablename is constant and thus easier to fetch.

    ASSIGN/V2="Overall tolerance range here is: "


    Then create a report comment, you don't need to change anything so just leave it at the default value (the comment text):

    COMMENT/REPT,
    "Edit the comment text"


    Edit the comment text directly in the edit window, otherwise I am not sure if this will work. Change the comment text to "V2" (without the quotation marks):

    COMMENT/REPT,
    V2


    When you move the cursor from this command, PC-DMIS should ask you if you are referring to the variable V2 or not. Answer yes to that question, because we want to use whatever value V2 holds, instead of the text "V2".
Reply
  • The problem is to know WHICH report comment contain the value you are looking for in the program?

    It would be a smarter solution to cast the text into a variable (just like you already thought of doing) because the variablename is constant and thus easier to fetch.

    ASSIGN/V2="Overall tolerance range here is: "


    Then create a report comment, you don't need to change anything so just leave it at the default value (the comment text):

    COMMENT/REPT,
    "Edit the comment text"


    Edit the comment text directly in the edit window, otherwise I am not sure if this will work. Change the comment text to "V2" (without the quotation marks):

    COMMENT/REPT,
    V2


    When you move the cursor from this command, PC-DMIS should ask you if you are referring to the variable V2 or not. Answer yes to that question, because we want to use whatever value V2 holds, instead of the text "V2".
Children
No Data