How to deactivate multiple parts in a product file by using CATIA macro (V5 R24)?
kindly suggest some way to do the same.
What you need depends on what you mean by "Deactivated".
The Product object has a method named ApplyWorkMode which allows you to change a part in an assembly between "Design Mode" and "Visualization Mode". In visulization mode the part will be displayed using a CGR but the part document will not be loaded in the session. Visualization mode is enabled as the default by setting "Tools->Options->Infrastructure->Product Structure->Cache Management tab->Work with the cache system".
If you want to completly turn off the part in an assembly, so there is no visualization, you can select the product node of the part (using Selection.Search, or Selection.Add, or interactive selection) and then call CATIA.StartCommand("Deactivate Terminal Node") or CATIA.StartCommand("Activate Terminal Node")
This latter is real useful if you have a huge assembly and don't want to load anything into your session until you really need to. If you set the option option "Tools->Options->Infrastructure->Product Structure->Product Visualization Tab->Do not activate default shapes on open" when you open an assembly the tree will be displayed with all parts unloaded and then you can activate what you need when you need.