dim cdoc as partdocument
set cdoc = catia.activedocument
dim mysel as selection
set mysel = cdoc.selection
for i = 1 to cdoc.part.bodies.count
mysel.clear
mysel.add cdoc.part.bodies.item(i)
Dim showstate As CatVisPropertyShow
mysel.VisProperties.getshow showstate
res = res & cdoc.part.bodies.item(i).name & "::" & showstate & chr(13)
mysel.clear
for j=1 to cdoc.part.bodies.item(i).shapes.count
dim myshape as CATIAShape
set myshape = cdoc.part.bodies.item(i).shapes.item(j)
mysel.clear
mysel.add myshape
mysel.VisProperties.getshow showstate
res = res & myshape.name & "::" & showstate & chr(13)
mysel.clear
next
next