full screen shot
full screen shot
(OP)
hi everyone
I have an issue with a macro
I have this macro that takes screen shoots, but it takes big areas that I don't need,
here is a picture of what im doing,
you will see a square, well what I need to know if its possible to take the screen shot but only the part not all the areas,
thank you for your help
I have an issue with a macro
I have this macro that takes screen shoots, but it takes big areas that I don't need,
here is a picture of what im doing,
you will see a square, well what I need to know if its possible to take the screen shot but only the part not all the areas,
thank you for your help





RE: full screen shot
Do you have only the CATPart loaded or a CATProduct ?
In your macro, before taking the screenshot, you have to use the command Reframe On, eventually Zoom In several times, then take the screenshot. You can also hide Compass and Spec Tree first.
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: full screen shot
Dim ObjViewer3D As Viewer3D
Set ObjViewer3D = CATIA.ActiveWindow.ActiveViewer
Dim objCamera3D As Camera3D
Set objCamera3D = CATIA.ActiveDocument.Cameras.Item(1)
CATIA.ActiveDocument.Selection.Clear
CATIA.ActiveDocument.Selection.Add (MySurface(o))
'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 & CStr(o) & exten
Dim objSpecWindow As SpecsAndGeomWindow
Set objSpecWindow = CATIA.ActiveWindow
objSpecWindow.Layout = catWindowGeomOnly
CATIA.StartCommand ("Compass")
'Toma la Fotografia
ObjViewer3D.FullScreen = True
ObjViewer3D.Viewpoint3D = objCamera3D.Viewpoint3D
ObjViewer3D.CaptureToFile 5, strName
ObjViewer3D.FullScreen = False
objSpecWindow.Layout = catWindowSpecsAndGeom
CATIA.StartCommand ("Compass")
ObjViewer3D.Viewpoint3D = objCamera3D.Viewpoint3D
and yes, I am only using a catpart loaded,
if you can help me with the commands I need to use for the reframe on or the zoom in, I really appreciate it,
thank you for your help
RE: full screen shot
CODE --> CATScript
Language="VBSCRIPT" Sub CATMain() ''''''''''''''iso view (if you want) Dim ActDoc As Document Set ActDoc = CATIA.ActiveDocument Dim camIsoView As Camera3D Set camIsoView = ActDoc.Cameras.Item("* iso") Dim objIsoViewPoint As Viewpoint3D Set objIsoViewPoint = camIsoView.Viewpoint3D ' set desired viewpoint for active viewer Dim ActWin As Window Set ActWin = CATIA.ActiveWindow Dim ActViewer As Viewer3D Set ActViewer = ActWin.ActiveViewer ActViewer.Viewpoint3D = objIsoViewPoint ''''''''''''''''''select MainBody Dim selection1 As Selection Set selection1 = ActDoc.Selection selection1.Search "Name=PartBody*,all" ''''or choose other method to select MainBody CATIA.StartCommand "Reframe On" ''''''''''''''''''''''hide spec tree and compass Dim specsAndGeomWindow1 As Window Set specsAndGeomWindow1 = CATIA.ActiveWindow Dim viewer3D1 As Viewer Set viewer3D1 = specsAndGeomWindow1.ActiveViewer viewer3D1.Reframe Dim MyWindow1 As SpecsAndGeomWindow Dim MyViewer1 As Viewer3D Set MyWindow1 = CATIA.ActiveWindow MyWindow1.Layout = catWindowGeomOnly Dim MyWindow As Window Dim MyViewer As Viewer Set MyWindow = CATIA.ActiveWindow Set MyViewer = MyWindow.ActiveViewer CATIA.StartCommand "Compass Of" ''''''''''''hide compass ''''''''''''''your code here CATIA.StartCommand "Compass On" 'back compass MyWindow1.Layout = catWindowSpecsAndGeom 'back geometry and spec tree End SubRegards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: full screen shot
I tried that option, and also the zoom in, and the zoom in works fine, but the thing is that when I have a different part how can CATIA know how much to zoom in,
what I imagine is like create an area depending on a my model, refere that area to the command zoom area or something like that,
hope you can help me, thank you so much for all your time and help
RE: full screen shot
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: full screen shot
RE: full screen shot
and when I, etather zooming in or out, the number changes
so I was wondering if this number can me modify in a macro,
I don't know how it is called, so I was unable to find any information
here I left a picture pointing at the number I am talking about
hope you can help me, thank you
RE: full screen shot
Regards,
Derek
Win XP64
21SP6/22SP4, 3DVIA Composer 2013X, ST R20
Dell T7400 16GB Ram
Quadro FX 4800 - 1.5GB
RE: full screen shot
Derek is right at first point not at second
I don't know if this will help you, but you can give a try and let us know...on my computer I get a 2 near axis.
I'm also curios how your code will look at the end.
CODE --> CATScript
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: full screen shot
because I have different sizes, and I need different zooming for each,
well thank you so much for all your help