Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

extension fiel 1

Status
Not open for further replies.

lapek

Aerospace
Aug 26, 2013
37
MX
hi every body, I have the next code

in this code I change the extension of my screenshot to JPG but for some reason it keeps give in me as a BMP resolution, and the issue is that the photos are really heavy

and the number of photos that I take are like 50 or more. I will need for this pictures to be lighter.

Dim ObjViewer3D As Viewer3D
Set ObjViewer3D = CATIA.ActiveWindow.ActiveViewer

Dim objCamera3D As Camera3D
Set objCamera3D = CATIA.ActiveDocument.Cameras.Item(1)

'De lineas a Solido
Set specsAndGeomWindow1 = CATIA.ActiveWindow
Set viewer3D1 = specsAndGeomWindow1.ActiveViewer
Set viewpoint3D1 = viewer3D1.Viewpoint3D
viewer3D1.RenderingMode = catRenderShadingWithEdges

'De fondo blanco a Azul
Set settingControllers1 = CATIA.SettingControllers
Set visualizationSettingAtt1 = settingControllers1.Item("CATVizVisualizationSettingCtrl")
visualizationSettingAtt1.AntiAliasingOffset = 0.2
visualizationSettingAtt1.SetBackgroundRGB 51, 51, 102
visualizationSettingAtt1.SaveRepository

'Esconder el arbol de operaciones
Dim objSpecWindow As SpecsAndGeomWindow
Set objSpecWindow = CATIA.ActiveWindow
objSpecWindow.Layout = catWindowGeomOnly
CATIA.StartCommand ("Compass")

'Ubicacion del guardado de la imagen
Dim fileloc As String
fileloc = "C:\Users\Lab3\Desktop\Fotos\"
Dim exten As String
exten = ".jpg"
Dim strName As String
strName = fileloc & "completo" & exten

'Toma la Fotografia
ObjViewer3D.FullScreen = True
ObjViewer3D.Viewpoint3D = objCamera3D.Viewpoint3D
ObjViewer3D.CaptureToFile 4, strName

ObjViewer3D.FullScreen = False
objSpecWindow.Layout = catWindowSpecsAndGeom
CATIA.StartCommand ("Compass")
ObjViewer3D.Viewpoint3D = objCamera3D.Viewpoint3D

thank you for all your help
 
Replies continue below

Recommended for you

thank you so much, it works perfect
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top