How can i move 2parts in a new component in spaceclaim using for loop when multipleparts are there?

selection = Selection.Create(result.CreatedBodies)
component = ComponentHelper.MoveBodiesToComponent(selection, Info5)
selection = BodySelection.Create(GetRootPart().GetBodies("Bolt"))
result = ComponentHelper.MoveBodiesToComponent(selection, component.CreatedComponents[0], False, Info6)

Answers

  • Chris Harrold
    Chris Harrold Member, Administrator, Employee Posts: 183
    5 Answers 100 Comments Photogenic Name Dropper
    admin

    @Rajesh Meena - can you assist?

  • Rajesh Meena
    Rajesh Meena Moderator, Employee Posts: 85
    Photogenic 5 Likes Name Dropper Ansys Employee
    ✭✭✭✭

    @AmrishKulkarni ,

    Below code can help me achieve component movement shown in image below:

    comp_sel = Selection.Create((GetRootPart().Components))
    ComponentHelper.MoveBodiesToComponent(comp_sel)

    I am moving all component but you can filter based on name or index.