hexagon logo

Basic Script for Execution

Hello all,

Before I spend a bunch of time digging into this I figured I would reach out to the community fist.  Somebody may already have created the kind of script.  My company has decided to get away from Datapage since it is no longer supported.  All reports end up put into an excel file, so that is my end goal.  I want a script that will execute all dimensions (all dimensions in a single execution).  I will simply place that at the end of our thousands of existing programs with the excel form report.  This would give me the ability to not have to install excel on 12 machines utilizing the excel form report within DMIS.  (already have a manipulated script that maps everything out to an excel file)  I just want to be able to execute the script and excel form report code together, so there is always full complete report uploaded.  I want the operators to be able to correct any errors as needed while running and then always include a complete report so we are not combining multiple reports together or appending the single report.  To put simply I just want the ability to create every dimension in the same execution (dimensions only).

Regards,

Matt Eaders

  • Hello & welcome!

    Let me try and get a better understanding of what you're looking to accomplish - you have a lot of programs, and a lot of machines in different configurations. You want to be able to run a program, and export the report to Excel, using a custom template. Is this correct?

    I am curious why you would not want to use Excel on the machine - without it, you only have access to the PDF version on the machine, and any Excel reports would have to be viewed from a different computer, correct?

    You currently have a script that exports dimensions to an Excel file? Without Excel? Or is all your data already located (somewhere) and you're trying to pull it into a different location, in an Excel file?

  • I created a template within the Excel Form Reports that will work on the machines to create the excel file without having excel on the actual machine itself.  I know I can accomplish this but the Excel Form Reports is based on execution not the report window, so when I have an operator (button pusher with absolutely no experience within DMIS) that needs to go back and run a hole because they messed their hits up.  I am an offline programmer working in the office not on the floor so I try to automate anything and everything.  The operators just look at the report window within DMIS itself for review.  My current script will work if I put Excel on each of the machines, I am just being stubborn at this point because I know this can be done without investing in excel.  Our current process is the datapage executable at the end of each program.  On a full execution it automatically generates an XML for the database at at the end of execution.  If they ran something backwards or took a wrong hole they can go back and execute each feature as needed.  They then review the report to make sure there is no more operator errors,  view full report mode, and they can run the executable as a block to generate and additional full report with no errors.  My thinking is if I can create a script that just executes all dimensions (not features themselves)  and place it at the end of the program just before the excel form report command.  Each time I would need to provide a full report, the operator can just execute the script and excel form report together.  I was having trouble 

  • I see! I had a similar setup some time ago. What I ended up doing to accomplish this was setting up a custom form at the beginning of each run. As a standard machine shop running valve spools (cylindrical parts with several round or flat slots and cross holes), we had Blanking, Milling, Rough Grind, Plate, and Finish Grind operations that would happen on each part. Five or ten blanks could make several hundred different pieces, so it was easier to program the CMM to run a family of parts within a single program, rather than each individual part number having a separate program. This made editing a routine significantly easier, since the logic should follow across the board for similar parts.

    When the operator would hit Execute, a form with several options would come up first. There were several radio buttons that would determine the operation as listed above, and some check boxes that would allow for different reports to be generated from the same program. One of the operations was simply "Print Report", which would only execute the report generation section of the program, which I always located at the end of each program. Each section was a different GOTO command; <code>If [This Box Checked], GOTO [Print Report]</code>

    I generated a Youtube video on how to generate a Form that will allow that - check this link for the video.

    Essentially what this is doing is selecting different start points for the program. If the program "starts" at the beginning of the report, it will simply pull all of the already-generated results into the report, in whatever format you have programmed in there. The operator can do this manually, but it can be difficult to get them to understand exactly where to run from.

  • TLDR; I used a Custom Form and special programming techniques to accomplish this. As far as an external script to do the same thing, another will have to chime in

  • I have something like this. It's not too difficult to do, and excel VBA gives you an insane amount of customization... You can make it really cool with logos and color schemes etc. 

    Basically the gist is it's not too complicated; you have to loop through every feature and check if it has a toleranced dimension, if so you add a row/column (however you lay it out). Took me quite a long time and it's "company property" so I won't share it. Trial and error will get you there. 

    Please, don't make your program run through 8 dialog boxes at the start. It's disgusting and if your operators are like mine it will waste hour after hour. Just have one input box for the lot# to save the file somewhere consistent.

  • I appreciate all the help!  I will have to take my previous script that loops through all the dimensions in the edit window and remove most of the meat to just execute said dimensions.  Essentially executing all dimensions at once without having to rely on much input from the operator other that review and press the button lol.  Again appreciate the help! Figured I'd reach out and see what other ideas may exist that I am not aware of.

  • +1 regarding dialog boxes - anything that can be messed up, will. Reducing operator input is a great reason to get a CMM in the first place, so requiring multiple inputs tends to cause more problems than it will solve. Forms, VBA, and special programming techniques are preferred specifically to get rid of these! More work on the programmer up front, but a better result overall

  • I have a a script that I found on this forum(it was incomplete and I had to update a lot of things) some time ago that generates excel files all using basic scripting. Would you like me to share it to get a better idea of what you want to do?

  • William, Thanks for your help.  I already have a similiar one that creates the perfect excel file.  Same thing as you did, I found it on here, completed it, and modified it to everything I need it to be.  My company is wanting to move away from Datapage and was looking into Q-DAS, so the script gives us option #1 to get away from Datapage.  I am only trying to create another script to avoid the cost of having to install excel on 12 computers.  Utilizing the excel form report that doesn't actually need excel on the computer.  I just hate the way excel form report gathers the data from the edit window per execution.  I had already set this all up back in 2020 when it first came out, but after testing how it would work, we lost the ability to run blocks throughout the program and update our report.  I could execute a mini routine to avoid this as well, but I don't want to put that on the operators.  Automation is king!!  When I get through the current wave of jobs I have I will get back on the script.

  • We probably found the same script! That thing was a mess...

    I have actually just 2 days ago created a script that executes a block of code using basic script. Would that be of any use for you? It contains dropdown list dialog boxes to use as a start and end command. It can certainly be modified to run "x block" and then recalculate the dimensions.