Trouble modifying existing SimpRep with C++ toolkit
Hello I was wondering if I may be doing something incorrectly or if anyone else has ran into similar issues.
I am attempting to modify existing SimpReps in a Creo assembly. When I go through the process there is no change to the SimpRep in the Creo assembly. Any insight or help would be appreciatted, below is the code segment where activeModel is a pfcModel_ptr retrieved from the session.
The model has SimpRep "INTERIOR" and it has a component with feature id = 450
pfcAssembly_ptr assem = pfcAssembly::cast(activeModel);
xintsequence_ptr ids = xintsequence::create();
ids->append(450);
pfcSimpRepItemPath_ptr sr_item_path = pfcSimpRepItemPath::cast(pfcSimpRepCompItemPath::Create(ids));
pfcSimpRepItem_ptr sr_item = pfcSimpRepItem::Create(sr_item_path);
pfcSimpRepAction_ptr action = pfcSimpRepAction::cast(pfcSimpRepInclude::Create());
sr_item->SetAction(action);
pfcSimpRepItems_ptr items = pfcSimpRepItems::create();
items->append(sr_item);
pfcSimpRep_ptr sr = assem->GetSimpRep("INTERIOR");
pfcSimpRepInstructions_ptr ins = sr->GetInstructions();
ins->SetDefaultAction(pfcSIMPREP_EXCLUDE);
ins->SetItems(items);
sr->SetInstructions(ins);
assem->ActivateSimpRep(sr);

