if (!!CE.Type NEQ 'SUBE') then
!!alert.Message('You have to be located on a SUBE where you want to move other primitives')
return
endif
--keep names
!getCESUBERefno = !!CE.Refno.String()
!getOwnerName = !!CE.Owner.Name
--get collection
VAR !getOtherSube COLLECT ALL SUBE WITH ( REFNO NEQ $!getCESUBERefno ) FOR $!getOwnerName
!getMems = object array()
!getMems.Clear()
!getPos = object array()
!getPos.Clear()
do !x from 1 to !getOtherSube.Size()
$!getOtherSube[$!x]
VAR !getMems APPEND EVAL ( STRING( REFNO ) ) FOR ALL ( SUBE MEM ) FOR CE
VAR !getPos APPEND EVAL ( STRING ( POS WRT /* ) ) FOR ALL ( SUBE MEM ) FOR CE
enddo
$!getCESUBERefno
do !x from 1 to !getMems.Size()
INCLUDE $!getMems[$!x]
$!getMems[$!x]
POSITION $!getPos[$!x] WRT WORLD
OWNER
enddo
!isDelete = !!Alert.Confirm('Delete empty SUBEs?')
if (!isDelete EQ 'YES') then
do !x from 1 to !getOtherSube.Size()
$!getOtherSube[$!x]
DELETE SUBE
enddo
endif
$!getCESUBERefno
if (!!CE.Type NEQ 'SUBE') then
!!alert.Message('You have to be located on a SUBE where you want to move other primitives')
return
endif
--keep names
!getCESUBERefno = !!CE.Refno.String()
!getOwnerName = !!CE.Owner.Name
--get collection
VAR !getOtherSube COLLECT ALL SUBE WITH ( REFNO NEQ $!getCESUBERefno ) FOR $!getOwnerName
!getMems = object array()
!getMems.Clear()
!getPos = object array()
!getPos.Clear()
do !x from 1 to !getOtherSube.Size()
$!getOtherSube[$!x]
VAR !getMems APPEND EVAL ( STRING( REFNO ) ) FOR ALL ( SUBE MEM ) FOR CE
VAR !getPos APPEND EVAL ( STRING ( POS WRT /* ) ) FOR ALL ( SUBE MEM ) FOR CE
enddo
$!getCESUBERefno
do !x from 1 to !getMems.Size()
INCLUDE $!getMems[$!x]
$!getMems[$!x]
POSITION $!getPos[$!x] WRT WORLD
OWNER
enddo
!isDelete = !!Alert.Confirm('Delete empty SUBEs?')
if (!isDelete EQ 'YES') then
do !x from 1 to !getOtherSube.Size()
$!getOtherSube[$!x]
DELETE SUBE
enddo
endif
$!getCESUBERefno