×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

NXOpen C++ application for moving DATUM CSYS to layer

NXOpen C++ application for moving DATUM CSYS to layer

NXOpen C++ application for moving DATUM CSYS to layer

(OP)
Hi, I want to move DATUM coordinates to a specified layer. Below is the journal which I am getting on recording:

Session::UndoMarkId markId1;
markId1 = theSession->SetUndoMark(Session::MarkVisibilityVisible, "Edit Object Display");

DisplayModification *displayModification1;
displayModification1 = theSession->DisplayManager()->NewDisplayModification();

displayModification1->SetApplyToAllFaces(false);

displayModification1->SetApplyToOwningParts(false);

displayModification1->SetNewLayer(123);

std::vector<DisplayableObject *> objects1(8);
CartesianCoordinateSystem *cartesianCoordinateSystem1(dynamic_cast<CartesianCoordinateSystem *>(workPart->FindObject("HANDLE R-4725")));
objects1[0] = cartesianCoordinateSystem1;
DatumAxis *datumAxis1(dynamic_cast<DatumAxis *>(workPart->Datums()->FindObject("DATUM_CSYS(0) Y axis")));
objects1[1] = datumAxis1;
DatumPlane *datumPlane1(dynamic_cast<DatumPlane *>(workPart->Datums()->FindObject("DATUM_CSYS(0) XY plane")));
objects1[2] = datumPlane1;
DatumPlane *datumPlane2(dynamic_cast<DatumPlane *>(workPart->Datums()->FindObject("DATUM_CSYS(0) YZ plane")));
objects1[3] = datumPlane2;
DatumAxis *datumAxis2(dynamic_cast<DatumAxis *>(workPart->Datums()->FindObject("DATUM_CSYS(0) Z axis")));
objects1[4] = datumAxis2;
DatumAxis *datumAxis3(dynamic_cast<DatumAxis *>(workPart->Datums()->FindObject("DATUM_CSYS(0) X axis")));
objects1[5] = datumAxis3;
DatumPlane *datumPlane3(dynamic_cast<DatumPlane *>(workPart->Datums()->FindObject("DATUM_CSYS(0) XZ plane")));
objects1[6] = datumPlane3;
Features::DatumCsys *datumCsys1(dynamic_cast<Features::DatumCsys *>(workPart->Features()->FindObject("DATUM_CSYS(0)")));
Point *point1(dynamic_cast<Point *>(datumCsys1->FindObject("HANDLE R-4726")));
objects1[7] = point1;
displayModification1->Apply(objects1);

delete displayModification1;


In the above code, "HANDLE R-4726" & "HANDLE R-4725" for point1 & cartesianCoordinateSystem1 are specific to a part. To make the code generic I want to get these names using journalidentifier() method. Can someone plz tell with which class/object journal identifier to be used for Point1 & cartesianCoordinateSystem1.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources