Hello,
I am trying to edit drafting view boundary manually using DisplayOgpPolyline & MotionCbData API. I am stuck as I could make program run. PLease have a look.
I am doing it on click of button & view(to change) in Block styler
private static void rubberband_rectangle_cb(double[] screen_pos, ref UFUi.MotionCbData motion, IntPtr data)
{
int pos_count = 0;
double[,] pos=new double[3,3];
// double[] start = { theStartPoint.X, theStartPoint.Y, theStartPoint.Z };
// theUfSession.Disp.DisplayOgpLine(motion_cb_data.view_tag, start, screen_pos);
theUfSession.Disp.DisplayOgpPolyline(motion.view_tag, pos, pos_count);
/* theEndPoint.X = screen_pos[0];
theEndPoint.Y = screen_pos[1];
theEndPoint.Z = screen_pos[2];*/
}
public static void createBoundary()
{
Part workPart = theSession.Parts.Work;
// DrawingViewBuilder dvb = workPart.DrawingSheets.
// MultipleViewPlacementBuilder mvpb = dvb.multipleViewPlacement();
NXOpen.Tag view_tag = default(NXOpen.Tag);
double[] point = new double[3];
IntPtr motion_cb_data = IntPtr.Zero;
int response = 0;
theUfSession.Ui.SpecifyScreenPosition("Select location", rubberband_rectangle_cb, motion_cb_data, point, out view_tag, out response);
//double[] draw_rect = { drawllc.X, drawllc.Y, drawurc.X, drawurc.Y };
// theUfSession.Draw.DefineViewManualRect(theDrawingView.Tag, draw_rect);
}
Is it possible to change view boundary manually using motion callback ? JUst like Manual option in View creation wizard in drafting