hexagon logo

macro or script to autorun PCD2Excel

Does anyone know how to write a script or macro to auto generate a report at the end of my program?

I know I can use
EXTERNALCOMMAND/DISPLAY ; C:\PROGRAM FILES\HEXAGON\PC-DMIS 2018 R2 64-BIT\EN\PCD2EXCEL.EXE


But, I don't want to be able to click on anything. I don't know where to start with writing this Marco or script but if anyone had any tips or pointers that would be helpful or even examples. I can work with that and figure it out. Just need a starting point.

My objective is to have the machinist start the part and do nothing else and just have the report auto generate at the end of each program. Create an excel sheet with all the information that PCD2Excel would generate. I simply just want to eliminate the process of clicking on the button.
Parents
  • Hello,

    we use a script instead of the built-in pcdmis facilities to generate an excel report (it is doable).

    I can't give you this script because there are too many company-specific adjustments in there and above all that the script has 1700 lines (very extensive, not for beginners)

    long story, little gain:
    it's not really any better than the normal excel report, you can just set a few captions and move the measured values in the excel file.
    Lots of effort and maintenance time (which the boss probably won't give you), for little extra benefit.
    Even if you create something like that, you're probably the only one who can maintain it and it's always your fault if it doesn't work.

    I can therefore only advise you against it
    on the other hand, learning a programming language doesn't make you dumber, even if it's just 'basic'.

    (if you really want to do that
    1.) look up how to create an excel file with basic, visual basic or a 'macro' and write data into a cell (excel helpfile mostly).
    2.) look up how to extract pcDMIS data from a feature or dimmension, you can find everything for this in the pcDMIS help file
    many examples of this online too)​
Reply
  • Hello,

    we use a script instead of the built-in pcdmis facilities to generate an excel report (it is doable).

    I can't give you this script because there are too many company-specific adjustments in there and above all that the script has 1700 lines (very extensive, not for beginners)

    long story, little gain:
    it's not really any better than the normal excel report, you can just set a few captions and move the measured values in the excel file.
    Lots of effort and maintenance time (which the boss probably won't give you), for little extra benefit.
    Even if you create something like that, you're probably the only one who can maintain it and it's always your fault if it doesn't work.

    I can therefore only advise you against it
    on the other hand, learning a programming language doesn't make you dumber, even if it's just 'basic'.

    (if you really want to do that
    1.) look up how to create an excel file with basic, visual basic or a 'macro' and write data into a cell (excel helpfile mostly).
    2.) look up how to extract pcDMIS data from a feature or dimmension, you can find everything for this in the pcDMIS help file
    many examples of this online too)​
Children