I am trying to create a macro that translates and formats some consolidated data (next window) into my main file in the previous window. I want to replace a handful of data only (particularly, the people-hg-lat, people-hg-sens, etc. detailed below. Right now, I am pulling all the data I need from an Excel file, and it can be edited to be in a different format for tagging purposes, but my current macro does not seem to have issues with that. It can successfully select the entire line's worth of data (using the tags for replacement) up to the end of the copied/pasted line. After that, it seems to have issues selecting multiple lines and finding the right ones to replace. I could use some help.
My main file looks like this before running my macro:
My next window data that I am trying to replace:
This is what I would like the file to look like after my macro:
What I have so far:
It works until end of \"*\"^(AREA/PERSON =*^)^(PEOPLE-HG-SENS =*^)^(PEOPLE-HG-LAT =*^)^(EQUIPMENT-W/AREA =*^)^(LIGHTING-W/AREA =*$^), then it does not continue selecting anything. UltraEdit also hates my replace command, these are just my notes.
My main file looks like this before running my macro:
Code: Select all
"My Room 1" = SPACE
INF-METHOD = AIR-CHANGE
INF-FLOW/AREA = 0.0147816
PEOPLE-HG-LAT = 230.877
PEOPLE-HG-SENS = 251.034
EQUIP-LATENT = ( 0 )
EQUIP-SENSIBLE = ( 1 )
LIGHTING-W/AREA = ( 1.71887 )
EQUIPMENT-W/AREA = ( 0.41 )
AREA/PERSON = 194.063
POLYGON = "EL1 Space Polygon 1"
..
"My Room 2" = SPACE
INF-METHOD = AIR-CHANGE
INF-FLOW/AREA = 0.001
PEOPLE-HG-LAT = 223.297
PEOPLE-HG-SENS = 251.443
EQUIP-LATENT = ( 0 )
EQUIP-SENSIBLE = ( 1 )
LIGHTING-W/AREA = ( 1.41073 )
EQUIPMENT-W/AREA = ( 0.336 )
AREA/PERSON = 308.618
POLYGON = "EL1 Space Polygon 2"
..
Code: Select all
"My Room 1"AREA/PERSON = 100PEOPLE-HG-SENS =275PEOPLE-HG-LAT =275EQUIPMENT-W/AREA =1LIGHTING-W/AREA ={#SI(#PA(/“Base Ltg Flag/”)*0.558 + #PA(“Proposed Ltg Flag”)*0.558)}
"My Room 2"AREA/PERSON = 200PEOPLE-HG-SENS =275PEOPLE-HG-LAT =475EQUIPMENT-W/AREA =1LIGHTING-W/AREA ={#SI(#PA(/“Base Ltg Flag/”)*0.56 + #PA(“Proposed Ltg Flag”)*0.56)}
Code: Select all
"My Room 1" = SPACE
INF-METHOD = AIR-CHANGE
INF-FLOW/AREA = 0.0147816
PEOPLE-HG-LAT = 275
PEOPLE-HG-SENS = 275
EQUIP-LATENT = ( 0 )
EQUIP-SENSIBLE = ( 1 )
LIGHTING-W/AREA ={#SI(#PA(/“Base Ltg Flag/”)*0.558 + #PA(“Proposed Ltg Flag”)*0.558)
EQUIPMENT-W/AREA = 1
AREA/PERSON = 100
POLYGON = "EL1 Space Polygon 1"
..
"My Room 2" = SPACE
INF-METHOD = AIR-CHANGE
INF-FLOW/AREA = 0.001
PEOPLE-HG-LAT = 275
PEOPLE-HG-SENS = 275
EQUIP-LATENT = ( 0 )
EQUIP-SENSIBLE = ( 1 )
LIGHTING-W/AREA = LIGHTING-W/AREA ={#SI(#PA(/“Base Ltg Flag/”)*0.56 + #PA(“Proposed Ltg Flag”)*0.56)
EQUIPMENT-W/AREA = 1
AREA/PERSON = 200
POLYGON = "EL1 Space Polygon 2"
..
Code: Select all
InsertMode
ColumnModeOff
HexOff
UltraEditReOn
Loop 0
Find RegExp "\"*\" = SPACE"
Find Select "\"*\""
Copy
NextWindow
Find "^c"
SelectLine
Copy
PreviousWindow
Key RIGHT ARROW
"
"
Paste
Key UP ARROW
Find RegExp "\"*\"^(AREA/PERSON =*^)^(PEOPLE-HG-SENS =*^)^(PEOPLE-HG-LAT =*^)^(EQUIPMENT-W/AREA =*^)^(LIGHTING-W/AREA =*$^)^([^p]++^) PEOPLE-HG-LAT = *$^nPEOPLE-HG-SENS = *$^([^n^r^t*$]++^)LIGHTING-W/AREA = *$^([^p]++^) EQUIPMENT-W/AREA = *$^([^n^r^t*$]++^)AREA/PERSON = *$"
Replace SelectText “^6 ^3 ^2 ^7 ^5 ^8 ^4 ^9 ^1”
EndLoop