Comment on report

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

  • Comment on report

    Hi guys,
    i have a Comment i'm adding on my report but when i run the part it doesn't show.
    [ASSIGN/V1=IF(PLN3.Z>ABS(PLN2.Z),"Shift left","Shift right")
    COMMENT/REPT,
    V1]
    i have this on another program also and it works good, so i don't know why it doesn't show now. PCDMIS 2019 R1

    thank you,
    D

  • #2
    Try
    Code:
    COMMENT/REPT,
    ""+V1.TEXT
    And make sure to re-execute the assignment/comment lines.

    Comment


    • #3
      Thank you for your reply, it didn't help. It's showing me all the dimensions on the reports but not this

      Comment


      • #4
        Try making a new comment with Jacob's answer.
        I find pcdmis comments aren't the best at switching between text and formula... not sure of a way to manually force it to one or the other

        Comment


        • #5
          Originally posted by TK_Fire View Post
          Try making a new comment with Jacob's answer.
          I find pcdmis comments aren't the best at switching between text and formula... not sure of a way to manually force it to one or the other
          It works if you just re-type any one character in your formula, preferably alpha vs numeric and lower case so when you move your cursor away from formula you will notice the lower case letter automatically switch to upper case if it's a valid/legal formula. If it doesn't auto upper case itself then you have an invalid formula.
          PcDmis 2015.1 SP10 CAD++
          Global 7-10-7 DC800S

          Comment


          • #6
            I would just re-type it in in the current comment. I noticed you had a square left bracket in there - hopefully that was just a copy/paste thing.

            If you enter a variable only you should be asked if it refers to the variable, if it doesn't ask it isn't recognizing it.

            Comment


            • #7
              Please copy and paste the exact PC-DMIS code that you are using if you haven't already. What are you observing? Nothing is appearing? "V1" is appearing? It is not updating on condition change? This works for me every single time:

              Code:
              ASSIGN/V1=IF(1 < 0, "TEXT1", "TEXT2")
              COMMENT/REPT,
              ""+V1.TEXT
              It spits out TEXT2 on my report. If I change the condition to TRUE, it'll spit out TEXT1 upon execution. As has been mentioned, when you create the comment, it may ask if you wish to write "V1" or the value stored in V1. You want to refer to the variable.
              Last edited by JacobCheverie; 10-03-2019, 01:12 PM.

              Comment


              • #8
                I deleted and re-added it a bunch of times, re-typed it, changed my variable to calling it something else (V2,V3), still not showing on report. I am confused as to why it's showing on my other program. It did recognize the variable but it won't show it on the report no matter what. i haven't changed any settings or anything on PCDMIS so i'm honestly lost why it just won't appear on the report.
                thank you so much everyone

                Comment


                • #9
                  Code:
                  [ASSIGN/V1=IF(PLN3.Z>ABS(PLN2.Z),"Shift left","Shift right")
                  COMMENT/REPT,
                  ""+V1.TEXT]

                  Comment


                  • JacobCheverie
                    JacobCheverie commented
                    Editing a comment
                    You do not have the square brackets in your PC-DMIS, do you?

                • #10
                  PLN2 and PLN3 are two parallel planes. And it tells the techs which way to adjust the machine to get them to be on the same distance from centerline. I am using this exact code on the other program and it always shows on the report. It was written by the person before me so i just copied and pasted it and changed my features

                  Comment


                  • #11
                    Disal Try commenting conditionally:

                    Code:
                    IF/PLN3.Z > ABS(PLN2.Z)
                        COMMENT/REPT,
                        SHIFT LEFT
                    END_IF/
                    ELSE/
                        COMMENT/REPT,
                        SHIFT RIGHT
                    END_ELSE/

                    Comment


                    • #12
                      No i don't have the brackets on the code, I wasn't sure how to post code here

                      Comment


                      • #13
                        Originally posted by JacobCheverie View Post
                        Disal Try commenting conditionally:

                        Code:
                        IF/PLN3.Z > ABS(PLN2.Z)
                        COMMENT/REPT,
                        SHIFT LEFT
                        END_IF/
                        ELSE/
                        COMMENT/REPT,
                        SHIFT RIGHT
                        END_ELSE/
                        I will run a part and see what happens, I am very new to PCDMIS so i don't know how to use the IF statements yet-trying to learn. Will let you know if it works. Thank you so much for taking your time to help

                        Comment


                        • #14
                          Disal You can enhance on this code if desired. If you wish to report how much of a shift to make:


                          Code:
                          ASSIGN/V1=PLN3.Z - ABS(PLN2.Z)
                          IF/V1 > 0
                              COMMENT/REPT,
                              "SHIFT LEFT BY " + V1 + " INCHES"
                          END_IF/
                          ELSE/
                              COMMENT/REPT,
                              "SHIFT RIGHT BY " + -V1 + " INCHES"
                          END_ELSE/
                          Or something along those lines, assuming you're in inches. There is a lot you can do with PC-DMIS and learning the coding/logic can help you obtain some valuable and helpful info.
                          Last edited by JacobCheverie; 10-03-2019, 01:42 PM.

                          Comment


                          • #15

                            You could also try this, even if JacobCheverie 's solution works fine !

                            ​​​​​​​
                            Code:
                            ASSIGN/V1="Shift left"
                            ASSIGN/V2="Shift right"
                            ASSIGN/V3=IF(PLN3.Z>ABS(PLN2.Z),V1,V2)
                            COMMENT/REPT,
                            V3

                            Comment

                            Related Topics

                            Collapse

                            Working...
                            X