hexagon logo

How to Insert an Image Into the Report

I'm looking at implementing external calculations for some of our measurement routines. I'll have a subroutine save scan data and then call an external program that processes it. The external program will output a graph as an image file as well as a couple of values. Including the values in the report is easy using generic features; however, how can I go about including the graph?

I looked into External Objects, but even when the link to external file box is checked, the image only updates when it's marked to execute, which also pops open MS Paint and pauses PC-DMIS. This is not at all what I want; I need the current, updated image file shown in the report, but without stopping the running program. Is there any way to do this?
Parents
  • I would create a report label. File/Reporting/New/Label Template.

    Add an Image object to the label - resize as needed.
    Select the output file as the input for the label image - this is a fixed image unless you add the Event to update it.

    Use the following to update the image before going to the report.
    Select the Events property for the Image object.

    Add the following code to the script.

    this.bitmap = "D:\Temp\ImageToUse.jpg" -- define your filename and path.

    Save the label.


    Then use the REPORT/LABEL command to point to the label you created. This will add the image to the report.
    REPORT/LABEL, FILENAME= imageLabel.lbl
  • Hey, I'm completely new to PC-DMIS and I'm trying to follow your directions to complete this. What exactly do you mean by "Select the output file as the input for the label image - this is a fixed image unless you add the Event to update it". I don't know where to do that? Sorry ahead if it's a dumb question.
Reply
  • Hey, I'm completely new to PC-DMIS and I'm trying to follow your directions to complete this. What exactly do you mean by "Select the output file as the input for the label image - this is a fixed image unless you add the Event to update it". I don't know where to do that? Sorry ahead if it's a dumb question.
Children
No Data