hexagon logo

Script to make a change in all programs?

All of our programs are set up to automatically save reports to a specific directory based on part number. IT has decided they need to re-map our entire network which means I need to edit all of our programs to save reports according to the new network mapping scheme. Is it possible to use a script for this task? If so, does anyone have an example of how to do this?
Parents
  • Without doing any testing, I would assume the path is usually stored in a PCDLRN.ENUM_FIELD_TYPES.FILE_NAME property underneath any command. In our loop that evaluates the command and modifies the path property, we could try taking out the conditional statement that filters out anything but print commands (notice I put an apostrophe at the beginning of the line that checked the command type; this comments out that line so it does not execute when the application is run):



    For whatever reason the Stats/Transfer command uses the PCDLRN.ENUM_FIELD_TYPES.TRANSFER_DIR property. I will have to look through my programs and see what commands are used with a network path. Luckily, as currently written I think this should take care of about 95% or my programs. There are only a few that have extra commands due to specific customer requirements for data capture.

    Your help is much appreciated! I am better off with the knowledge you have shared; thank you!
Reply
  • Without doing any testing, I would assume the path is usually stored in a PCDLRN.ENUM_FIELD_TYPES.FILE_NAME property underneath any command. In our loop that evaluates the command and modifies the path property, we could try taking out the conditional statement that filters out anything but print commands (notice I put an apostrophe at the beginning of the line that checked the command type; this comments out that line so it does not execute when the application is run):



    For whatever reason the Stats/Transfer command uses the PCDLRN.ENUM_FIELD_TYPES.TRANSFER_DIR property. I will have to look through my programs and see what commands are used with a network path. Luckily, as currently written I think this should take care of about 95% or my programs. There are only a few that have extra commands due to specific customer requirements for data capture.

    Your help is much appreciated! I am better off with the knowledge you have shared; thank you!
Children
No Data