Delete Deactivated Features CATIA macro

Hi folks,

I'm working on VBscript to delete unused Bodies in a CATPart and would like to get some help please!

In one CATPart I have multiple Bodies with Assembles and Bodies inside (see image).
I'd like to wirte a macro, which can run a search through out the CATPart and delete all the deactivated Assembles and the bodies inside them,
for example here Assemble.9/SALT, Assemble.74/SAD, Assemble.14/Winkelstueck_B1 and so on.

I tend to use the loop
For i = 1 To part1.Bodies.Count
to run through the CATPart but don't know how to make the macro recognize the deactivated Assembles and delete the Body inside ?
Have anyone any idea ? Thanks for your help.

2 Answers

Sorry I can't offer any macro programming advice, but you can list all the deactivated features by using the Tools + Parameterization Analysis pull down and clicking the INACTIVATED FEATURES item.

For CATIA macro help, go to the CATIA forum at Eng-Tips ( https://www.eng-tips.com/threadminder.cfm?pid=560 ). Many helpful programmers there.

Hi Jack,

your methode is way simpler than the one with VBS-script. Thanks a lot.