Hi everyone,
I have one question about screen capture.
If I create .rtf file with captures all is good but if I save screen capture from clipboard the view is black :
modele_view=structure.Selections.Get(IRobotObjectType.I_OT_OBJECT)
modele_view.FromText(“Panel”)
viewRobot=IRobotView3(app.Project.ViewMngr.CreateView(IRobotViewType.I_VT_STANDARD))
viewRobot.Selection.Set(IRobotObjectType.I_OT_OBJECT, modele_view)
viewRobot.Visible = True
viewRobot.Redraw(0)
viewRobot.Projection=IRobotViewProjection.I_VP_3DXYZ
viewRobot.Title = “Vue du modèle”
viewRobot.ParamsDisplay.Set(IRobotViewDisplayAttributes.I_VDA_STRUCTURE_STRUCTURE, True)
viewRobot.ParamsDisplay.Set(IRobotViewDisplayAttributes.I_VDA_STRUCTURE_BAR_NUMBERS, True)
viewRobot.ParamsDisplay.Set(IRobotViewDisplayAttributes.I_VDA_STRUCTURE_SUPPORT_SYMBOLS, True)
viewRobot.ParamsDisplay.Set(IRobotViewDisplayAttributes.I_VDA_STRUCTURE_ATTRIBUTE_LABELS, True)
viewRobot.ParamsDisplay.Set(IRobotViewDisplayAttributes.I_VDA_SECTIONS_NAME, True)
viewRobot.ParamsDisplay.Set(IRobotViewDisplayAttributes.I_VDA_SECTIONS_SURFACE, True)
viewRobot.ParamsDisplay.Set(IRobotViewDisplayAttributes.I_VDA_SECTIONS_MATERIAL, True)
viewRobot.ParamsDisplay.Set(IRobotViewDisplayAttributes.I_VDA_FE_PANEL_CONTOURS, True)
viewRobot.ParamsDisplay.Set(IRobotViewDisplayAttributes.I_VDA_FE_PANEL_NAMES , True)
viewRobot.ParamsDisplay.Set(IRobotViewDisplayAttributes.I_VDA_FE_PANEL_THICKNESSES , True)
viewRobot.ParamsDisplay.Set(IRobotViewDisplayAttributes.I_VDA_FE_CONTOUR_COMPONENTS, True)
viewRobot.ParamsDisplay.Set(IRobotViewDisplayAttributes.I_VDA_ADVANCED_ELASTIC_FOUNDATION, True)
scPar=IRobotViewScreenCaptureParams(app.CmpntFactory.Create(IRobotComponentType.I_CT_VIEW_SCREEN_CAPTURE_PARAMS))
scPar.Name=”Vue du modèle”
scPar.UpdateType = IRobotViewScreenCaptureUpdateType.I_SCUT_CURRENT_VIEW
scPar.Resolution = IRobotViewScreenCaptureResolution.I_VSCR_4096
scPar.UpdateType = IRobotViewScreenCaptureUpdateType.I_SCUT_COPY_TO_CLIPBOARD
viewRobot.MakeScreenCapture(scPar)
from PIL import ImageGrab, Image
im= ImageGrab.grabclipboard()
if isinstance(im, Image.Image):
im.save(‘Vue du modèle.png’)
Do you have any ideas to fix it ?
Thank you in advance,
Regards