Hi everyone,
I just tried to call AccessSelections to change my MoveCopyBody Feature and add a mate to it.
AccessSelections always returns with a 'false', and I cannot figure out why it does.
Here is my code:
__________________________________________________________________________________________________
doc.ClearSelection2(true);
feat.Select2(false, 0);
IFeature varfeat = doc.FeatureManager.InsertMoveCopyBody2(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false, 1);
IMoveCopyBodyFeatureData featD = (IMoveCopyBodyFeatureData)(varfeat.GetDefinition());
bool status = featD.AccessSelections(mdoc, null);
write("access selections: " + status.ToString());
Component2 comp = null;
doc.ClearSelection2(true);
int stat = 0;
Mate2 mate = null;
doc.Extension.SelectByID2("Punkt3@Skizze3", "SKETCHPOINT", 0, 0, 0, false, 1, null, 0);
doc.Extension.SelectByID2("Koordinatensystem1-" + feat.Name, "COORDSYS", 0.0, 0.0, 0.0, true, 1, null, 0);
mate = featD.AddMate(null, (int)swMateType_e.swMateCOINCIDENT, 0, 0.0, 0.0, out stat);
getAddMateError(stat);
__________________________________________________________________________________________________
I am very thankful for any answer.
Thanks,
Bastian
SolidworksApi macros