viger
Mechanical
- Apr 25, 2008
- 1
I've already try to use journal but, is there a possibility to replace "name of object" in juornal to a feature id?
Body *body1(dynamic_cast<Body *>(wp2->Bodies()->FindObject(name2)));
Body *body1(dynamic_cast<Body *>(feature2));
NXOpen:isplayableObject *featd (dynamic_cast <NXOpen:isplayableObject *> (feature2));
//Body *body1(dynamic_cast<Body *>(featd));
std::vector<NXObject *>featd(1);
bool added1;
added1 = booleanBuilder1->Targets()->Add(body1);
NXOpen:isplayableObject *impd (dynamic_cast <NXOpen:isplayableObject *> (imp));
bool added2;
//Body *body2(dynamic_cast<Body *>(wp2->Bodies()->FindObject(name1)));
Body *body2(dynamic_cast<Body *>(impd));
added2 = booleanBuilder1->Tools()->Add(impd);
Session::UndoMarkId markId2;
markId2 = theSession->SetUndoMark(Session::MarkVisibilityInvisible, "Subtract");
NXObject *nXObject1;
nXObject1 = booleanBuilder1->Commit();
Session2->DeleteUndoMark(markId1, NULL);
Session2->SetUndoMarkName(markId1, "Subtract");
booleanBuilder1->Destroy();
or maybe someone have idea or exemple of code for subtract boolean operation of two objects (solids) one is imported from part file in that case,
target id was taken from hire:
Features::Feature *feature2;
feature2 = BlockFeatureBuilder->CommitFeature();
imported tool was taken from hire:
imp = partImporter1->Commit();
erros:
No object found with this name
or
Invalid target body
Body *body1(dynamic_cast<Body *>(wp2->Bodies()->FindObject(name2)));
Body *body1(dynamic_cast<Body *>(feature2));
NXOpen:isplayableObject *featd (dynamic_cast <NXOpen:isplayableObject *> (feature2));
//Body *body1(dynamic_cast<Body *>(featd));
std::vector<NXObject *>featd(1);
bool added1;
added1 = booleanBuilder1->Targets()->Add(body1);
NXOpen:isplayableObject *impd (dynamic_cast <NXOpen:isplayableObject *> (imp));
bool added2;
//Body *body2(dynamic_cast<Body *>(wp2->Bodies()->FindObject(name1)));
Body *body2(dynamic_cast<Body *>(impd));
added2 = booleanBuilder1->Tools()->Add(impd);
Session::UndoMarkId markId2;
markId2 = theSession->SetUndoMark(Session::MarkVisibilityInvisible, "Subtract");
NXObject *nXObject1;
nXObject1 = booleanBuilder1->Commit();
Session2->DeleteUndoMark(markId1, NULL);
Session2->SetUndoMarkName(markId1, "Subtract");
booleanBuilder1->Destroy();
or maybe someone have idea or exemple of code for subtract boolean operation of two objects (solids) one is imported from part file in that case,
target id was taken from hire:
Features::Feature *feature2;
feature2 = BlockFeatureBuilder->CommitFeature();
imported tool was taken from hire:
imp = partImporter1->Commit();
erros:
No object found with this name
or
Invalid target body