What would it take to create an import function that would allow you to automatically reassign memory locations for variables if they were already in use in the current project and the nicknames didn't match?
If you make the "reassignable" memory locations as unassigned nicknames after you export them, the work flow to resolve them is already there. You can even do it with your existing export file (assuming you assigned nicknames to everything that is reassignable).
Here's an example section of an export file:
#BEGIN ELEMENT_DOC
"X0","SimPIDLoopMode","","OFF - Manual","ON - Auto"
"X1","SP_Selection","","OFF - Thermostat","ON - Ramp/Soak Profile"
"WX0","RawOvenTemp","12 bit analog",""
"WX1","RawThermostat","12 bit analog",""
"C0","JogSimRS","leading edge",""
"C1","PauseSimRS","",""
#END
Say we want all the ID 1's to be "reassignable" (so X1, WX1, C1), change those lines to the following
#BEGIN ELEMENT_DOC
"X0","SimPIDLoopMode","","OFF - Manual","ON - Auto"
UB,"SP_Selection","","OFF - Thermostat","ON - Ramp/Soak Profile"
"WX0","RawOvenTemp","12 bit analog",""
UN,"RawThermostat","12 bit analog",""
"C0","JogSimRS","leading edge",""
UB,"PauseSimRS","",""
#END
UB - means Unassigned Bit
UN - means Unassigned Numeric
US - means Unassigned Struct
After you import the code using Tools->Insert Instructions from File, go to the Tools->Assign Nicknames utility and resolve them for THAT specific project, e.g. RawThemostat may be WX5 in one project, D42 in another.
As a test, I tried to insert the following from file:
STR bMasterRun
TMR tRunDlyTimer 10000
// Rung $Main#2
// Offset 3
STR tRunDlyTimer.Done
OUT bRunMotor
// End of Code Block $Main
$PGMEND $Main
#BEGIN ELEMENT_DOC
UB,"bMasterRun","",""
UB,"bRunMotor","",""
US,"tRunDlyTimer","",""
#END
I get an error upon insertion that the data size must be one of bit, but this is a structure (because of the timer). If I define it as a UB, I get an error telling me that it must be a structure but it's defined as a bit.