- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
My questions are:
1. How do i add a screenshot to the report?
2. How do i clear all screenshots, so each time i run my function it does not ask to overwrite screenshots with the same name
3. How do i add nodes and element tables to the report with the API?
My code for creating a view and screenshot it: The "AddScToReport" doesn't work for me
RobotViewScreenCaptureParams ScPar;
ScPar = robApp.CmpntFactory.Create(IRobotComponentType.I_CT_VIEW_SCREEN_CAPTURE_PARAMS);
ScPar.UpdateType = IRobotViewScreenCaptureUpdateType.I_SCUT_UPDATED_UPON_PRINTING;
IRobotView3 robotView = (IRobotView3)robApp.Project.ViewMngr.CreateView(IRobotViewType.I_VT_STANDARD);
RobotGeoPoint3D point1 = (RobotGeoPoint3D)robApp.CmpntFactory.Create(IRobotComponentType.I_CT_GEO_POINT_3D);
RobotGeoPoint3D point2 = (RobotGeoPoint3D)robApp.CmpntFactory.Create(IRobotComponentType.I_CT_GEO_POINT_3D);
RobotGeoPoint3D point3 = (RobotGeoPoint3D)robApp.CmpntFactory.Create(IRobotComponentType.I_CT_GEO_POINT_3D);
point1.Set(22.5, 0, 0);
point2.Set(29.5, 0, 0);
point3.Set(22.5, 0, 6.7);
robotView.SetLocal(point1, point2, point3);
robotView.Selection.Get(IRobotObjectType.I_OT_CASE).FromText("5");
robotView.ParamsDiagram.Set(IRobotViewDiagramResultType.I_VDRT_NTM_MY, true);
robotView.ParamsDiagram.Descriptions = IRobotViewDiagramDescriptionType.I_VDDT_TEXT;
robotView.ParamsDiagram.PositiveNegative = IRobotViewDiagramSignDifferType.I_VDSDT_DIFFERENTIATED;
robotView.ParamsDiagram.Filling = IRobotViewDiagramFillingType.I_VDFT_FILLED;
robotView.ParamsDiagram.Values = IRobotViewDiagramValueType.I_VDVT_LOCAL_EXTREMES;
robotView.Redraw(1);
ScPar.Name = "Moment";
robotView.MakeScreenCapture(ScPar);
robApp.Project.ViewMngr.Refresh();
robApp.Project.PrintEngine.AddScToReport(ScPar.Name); //<-------------------- This does not work
Solved! Go to Solution.
