hexagon logo

Modify PCD2EXCEL Header output

I need to modify the header that is being output by the PCD2EXCEL wizard (CSV output mode). Instead of referencing the formal program header I need it to reference the value of several variables in the program. I can think of two general appraoches to this:
1) Directly reference the variable in the basic code
2) Write the value out to an external file and then reference them from there.

Is it possible to directly reference the value of PC-DMIS assignment from an external executable?

Currently the PCD2EXCEL code that writes the serial number to the header looks like this:
If bSerialNumber Then
    CSVCells(HeaderRow, HeaderCol) = ConvertToCSV(MyLoadResString(IDS_SERIAL_NUMBER) + ":")
    CSVCells(HeaderRow, HeaderCol + 1) = ConvertToCSV(DmisPart.SerialNumber)
    MessagesList.AddItem (MyLoadResString(IDS_SERIAL_NUMBER) + ":" + DmisPart.SerialNumber)
    MessagesList.ListIndex = MessagesList.ListCount - 1
    HeaderRow = HeaderRow + 1


Instead of referenceing "Dmispart.SerialNumber" can I directly reference the value of an assignement? If so, how would I do this?

If this isn't possible then I think I will need to write out the information that I need to the P2X file and then read it in from there using the same syntax that is used pull in the other values from that file.

Has anyone done this before and have an example of a custum line that they have written into the P2X file and then how it is read into the PCD2Excel code?