ICimDocument::SavePicture

Use this method to capture the current document picture as a JPG file (similar to taking a screenshot of current screen). 

Compatibility

Cimatron 2024 or later

Syntax

SavePicture(string aPath);

def SavePicture(str aPath)->None

Return Type

Return:   
   

Input Type

Input: string

iPath—Path and name of the picture 

   

Remarks

The .JPG extension is added automatically.

Example

interop.CimAppAccess.AppAccess aAppAccess = new interop.CimAppAccess.AppAccess();
interop.CimatronE.IApplication CimApp = (interop.CimatronE.IApplication)aAppAccess.GetApplication();
interop.CimatronE.ICimDocument aDocument = CimApp.GetActiveDoc();
if (aDocument != null)
{
if (aDocument.Type == interop.CimatronE.DocumentEnumType.cmAssembly)
{
aDocument.SavePicture(@"C:\CurrentActiveDocPic");
}
}

import clr
#Adding references of required interop dlls
clr.AddReference("interop.CimAppAccess")
clr.AddReference("interop.CimatronE")
clr.AddReference("interop.CimServicesAPI")
clr.AddReference("interop.CimBaseAPI")
clr.AddReference("interop.CimMdlrAPI")

#importing modules from interop dlls
import interop.CimAppAccess
import interop.CimatronE
import interop.CimServicesAPI
import interop.CimBaseAPI
import interop.CimMdlrAPI

#Getting AppAccess Object
aCimAppAccess = interop.CimAppAccess.AppAccess()
#Getting instance of CimatronE Application
aCimApp = None
while (aCimApp == None) :
aCimApp = (interop.CimatronE.IApplication)(aCimAppAccess.GetApplication())
aDocument = (interop.CimatronE.ICimDocument)(aCimApp.GetActiveDoc())
if (aDocument != None) :
if (aDocument.Type == interop.CimatronE.DocumentEnumType.cmAssembly) :
aDocument.SavePicture('C:\CurrentActiveDocPic')