[API Questions] Operations cannot be selected using "activeSelections()->add()"

[API Questions] Operations cannot be selected using "activeSelections()->add()"

Anonymous
Not applicable
386 Views
0 Replies
Message 1 of 1

[API Questions] Operations cannot be selected using "activeSelections()->add()"

Anonymous
Not applicable

The Fusion API's "active Selections()->add()" allows you to select Body or Face.
But, Operation is not selected.
Is there a way to select Operation?

 

[C++ Code]
Ptr<Application> app = Application::get();
Ptr<UserInterface> ui = app->userInterface();
Ptr<Document> doc = app->activeDocument();
Ptr<Products> products = doc->products();
Ptr<CAM> camProduct = products->itemByProductType("CAMProductType");
Ptr<Design> design = products->itemByProductType("DesignProductType");
Ptr<Component> rootComponent = design->rootComponent();
Ptr<BRepBodies> allBodies = rootComponent->bRepBodies();
Ptr<BRepBody> body = allBodies->item(0);
Ptr<Setup> setup = camProduct->setups()->item(0);
Ptr<Operation> operation = setup->operations()->item(0);

 

//Body can be "activeSelections()->add()"
ui->activeSelections()->add(body);

 

//Opertaion "activeSelections()->add()" not possible
ui->activeSelections()->add(operation);

 

0 Likes
387 Views
0 Replies
Replies (0)