Here is a link to the exact section of the [API]. I'm really starting to believe this is a bug and I don't have a license type which allows me to file bugs apparently (?)
I just want to modify an existing restraint.
I'm able to load the COSMOS addin, load the part, load a pre-existing non linear study so I know this is done correctly.
// E.g I'm able to change the study duration
I now simply want access to a ICWRestraint but can't seem to get this. I go through the LoadsAndRestraintsManager to get a LoadsAndRestraints. Using this I'm able to call the functions get_Name and get_Type which return the proper name and type for the restraint so I know this is correct, but calling get_EntityCount returns a count of 0 and GetEntityAt returns NULL.
long error = 0;
long num = 0;
restraints_manager->get_Count(&num); // num == 4 (4 restraints in my FEA study)
restraints_manager->GetLoadsAndRestraints(1, &error, &restraint); // gets the second restraint entry (reference geometry)
BSTR name =L"";
restraint->get_Name(&name); // name == foo
restraint->get_Type(&num); // type == 2 (restraint)
restraint->get_EntityCount(&num); // num == 0
long sel = swSelSIMELEMENT;
struct IDispatch *restraint_dispatch;
restraint->GetEntityAt(0, &sel, &restraint_dispatch); // restraint_dispatch == NULL
I just want to modify/have access to an existing restraint. Any help would be greatly appreciated.