add attachToRefresh=True
theSection = 5
nextFreeBlock = cmds.headsUpDisplay(nextFreeBlock=theSection)
oHUD_Index = cmds.headsUpDisplay(
"mHUD_currnetCam",
section=theSection,
block=nextFreeBlock,
blockSize="small",
labelFontSize="small",
dataFontSize="small",
label="",
command=getCurrentCam,
attachToRefresh=True
# event="cameraChange",
)