Code below is for getting connecting member reference.
q var !finalmatchingSteels
---------------------Result-------------------------------------------------------------------
<ARRAY>
[1] <STRING> '=25588/82449'
<ARRAY>
[1] <STRING> '=25588/158392'
--------------------------------Result Required ------------------------------------------------------------
[1] <STRING> '=25588/82449'
[2] <STRING> '=25588/158392'
---------------------------------------------------------------------code---------------------------------------------------------------
!suppAr = !!collectALLFor(|:SECSUPPORT|,||,!!ce)
!arr = object ARRAY()
--!matchingSteels = object array()
do !Su from 1 to !suppAr.size()
!ref = !suppAr[!Su]
!SctnAr = !!collectALLFor(|SCTN|,||, !ref)
DO !s to !SctnAr.size()
!Sref = !SctnAr[!s]
!pos = !Sref.pose.wrt(WORLD)
!finalmatchingSteels = object array()
!eastMin = !pos.east - 10mm
!northMin = !pos.north - 10mm
!upMin = !pos.up - 10mm
!eastMax = !pos.east + 10mm
!northMax = !pos.north + 10mm
!upMax = !pos.up + 10mm
VAR !matchingSteels COLL ALL (GENSEC SCTN PANE ) WITH (NOT MATCHW(NAME OF ZONE,'*TEMP*') AND NOT MATCHW(NAME OF ZONE,'*-STUDY1*') AND NOT MATCHW(NAME OF ZONE,'*-STUDY*') AND NOT MATCHW(NAME OF ZONE,'*-SEC*')) exactly WITHIN E $!eastMin N $!northMin U $!upMin TO E $!eastMax N $!northMax U $!upMax
--q var !matchingSteels
DO !x INDEX !matchingSteels
!SteelZone = !matchingSteels[!x].dbref().owner.owner.owner.owner.name
!Steeltype = !matchingSteels[!x].dbref().type
--q var !type
if (!matchingSteels.size().gt(0)) then
if MATCHW(!SteelZone,'*TEMP*') then
skip
Elseif MATCHW(!SteelZone,'*SEC*') then
skip
Elseif !matchingSteels.size().gt(1) and (!Steeltype eq'PANE') then
skip
else
VAR !finalmatchingSteels coll all (GENSEC SCTN) WITH (NOT MATCHW(NAME OF ZONE,'*TEMP*') AND NOT MATCHW(NAME OF ZONE,'*-STUDY1*') AND NOT MATCHW(NAME OF ZONE,'*-STUDY*') AND NOT MATCHW(NAME OF ZONE,'*-SEC*')) exactly WITHIN E $!eastMin N $!northMin U $!upMin TO E $!eastMax N $!northMax U $!upMax for $!SteelZone
--!finalmatchingSteels = !!collectALLFor(|GENSEC|,|WITH (NOT MATCHW(NAME OF ZONE,'*TEMP*') AND NOT MATCHW(NAME OF ZONE,'*-STUDY1*') AND NOT MATCHW(NAME OF ZONE,'*-STUDY*') AND NOT MATCHW(NAME OF ZONE,'*-SEC*')) exactly WITHIN E $!eastMin N $!northMin U $!upMin TO E $!eastMax N $!northMax U $!upMax|,$!SteelZone)
endif
q var !finalmatchingSteels
endif
enddo
enddo
enddo