• Hello All,

    There is a very useful command (cons dist p1 to p3) which gives you all the required dimensions.
    I tried to use this in Quick report to generate some dimensional reports but its not working there.does anyone have similar issue? any advise?

    Thanks.
  • convert this into a variable and give variable in quick report
  • Thanks, can you give me sample variable for this?
  • You can use the command "var !dist cons dist p1 to p3" and then you'll have the result in the variable !dist.
  • You can use the command "var !dist cons dist p1 to p3" and then you'll have the result in the variable !dist.


    Thanks for the update. Please advise me what is wrong in my input.
    1) I entered "var !dist cons dist p1 to p3" in command line.
    2) I created my own quick reports and in the columns I added (!Dist) , no error but when you generate the reports, there is no output for the Columns !Dist and its blank.

    Thanks.
  • My apologies, I did not read your entire question, truly sorry about that. What I suggested will not work in a quick report.
    Now to get that info into a report might be slightly tricky, the only way I can think of is to create a pseudo uda that does the calculation when you query it. You could then add this uda to your quick report. I tried with a standard report as well but that didn't work either. Does anyone else have any ideas about this?
  • First method is to use UDA.

    Second method is to customize Quick Report macro with PML
    Create PML function:
    define function !!getDist(!pos1 is POSITION, !pos2 is POSITION) is STRING
       var !dist cons dist $!pos1 to $!pos2
       return !dist
    endfunction

    Run in commandline to show pdms new function:
    pml rehash all

    And after you create quick report and run. Open file that it generated here %pdmswk%/TMP.MAC .
    Add this line, after declaration of variable !col2 ... ignore any ||.
    In my case !col2 - is for second column

    !col2 = !selection.EVALUATE(OBJECT BLOCK('!!getDist(!selection[!EVALINDEX].dbref().PPos[1],!selection[!EVALINDEX].dbref().PPos[3])'))

    Then you can run your report again with command:
    $m /d:\AVEVA\Plant\PDMS12.1.SP4\pdmswk\TMP.MAC
  • [QUOTE=me_hungry;113101]First method is to use UDA.

    Second method is to customize with PML
    Create PML function:
    define function !!getDist(!pos1 is POSITION, !pos2 is POSITION) is STRING
       var !dist cons dist $!pos1 to $!pos2
       return !dist
    endfunction

    Run in commandline to show pdms new function:
    pml rehash all

    And after you create quick report and run. Open file that it generated here %pdmswk%/TMP.MAC .
    Add this line, after declaration of variable !col2 ... ignore any ||.
    In my case !col2 - is for second column

    !col2 = !selection.EVALUATE(OBJECT BLOCK('!!getDist(!selection[!EVALINDEX].dbref().PPos[1],!selection[!EVALINDEX].dbref().PPos[3])'))


    Awesome, Thanks, I will check this.

    [COLOR="silver"]- - - Updated - - -[/COLOR]

    [QUOTE=mno;113100]My apologies, I did not read your entire question, truly sorry about that. What I suggested will not work in a quick report.
    Now to get that info into a report might be slightly tricky, the only way I can think of is to create a pseudo uda that does the calculation when you query it. You could then add this uda to your quick report. I tried with a standard report as well but that didn't work either. Does anyone else have any ideas about this?

    Thanks MNO for the update
  • Hi there!!
    I have an simplier problem.
    I need the distance between 2 elements, per say 2 boxes,   say box A and Box B,  how can I get the distance between these boxes in PML ?

    Thanks in Advance
  • This is the third time you are posting the same question....
    Someone will come back to you with an answer soon.
    All you need is just a little patience....(as Axl Rose used to sing...)
    ;-)