Difference between revisions of "CAObject::PictureToFile"
(Marked this version for translation) |
|||
Line 3: | Line 3: | ||
<languages /> | <languages /> | ||
<translate> | <translate> | ||
− | = bool PictureToFile(fileName,mimeType) = | + | = bool PictureToFile(fileName,mimeType) = <!--T:1--> |
+ | <!--T:2--> | ||
Causes ADE to retrieve [[CAObject]] object’s picture, if any, and save it to file «filename», in the format specified by «mimeType». | Causes ADE to retrieve [[CAObject]] object’s picture, if any, and save it to file «filename», in the format specified by «mimeType». | ||
− | == Parameters == | + | == Parameters == <!--T:3--> |
+ | <!--T:4--> | ||
«filename»: string. | «filename»: string. | ||
+ | <!--T:5--> | ||
«mimeType»: string. Usually one of: | «mimeType»: string. Usually one of: | ||
* <code>"image/jpeg"</code> | * <code>"image/jpeg"</code> | ||
Line 17: | Line 20: | ||
* <code>"image/png"</code> | * <code>"image/png"</code> | ||
− | == Return value == | + | == Return value == <!--T:6--> |
+ | <!--T:7--> | ||
Boolean. '''True''' on success. | Boolean. '''True''' on success. | ||
− | = Usage = | + | = Usage = <!--T:8--> |
− | == C# == | + | == C# == <!--T:9--> |
− | [[CAObject]] obj = ade.Get("Pi1"); | + | <!--T:10--> |
+ | [[CAObject]] obj = ade.Get("Pi1"); | ||
bool bSuccess = obj.PictureToFile( @"C:\Temp\myPict.jpg","image/jpeg"); | bool bSuccess = obj.PictureToFile( @"C:\Temp\myPict.jpg","image/jpeg"); | ||
− | = See Also = | + | = See Also = <!--T:11--> |
+ | <!--T:12--> | ||
* [[CAObject::PictureToStream]] method | * [[CAObject::PictureToStream]] method | ||
</translate> | </translate> |
Latest revision as of 00:43, 16 June 2015
ADE User Guide > ADE Server Class Reference > CAObject
bool PictureToFile(fileName,mimeType)
Causes ADE to retrieve CAObject object’s picture, if any, and save it to file «filename», in the format specified by «mimeType».
Parameters
«filename»: string.
«mimeType»: string. Usually one of:
"image/jpeg"
"image/bmp"
"image/tiff"
"image/png"
Return value
Boolean. True on success.
Usage
C#
CAObject obj = ade.Get("Pi1"); bool bSuccess = obj.PictureToFile( @"C:\Temp\myPict.jpg","image/jpeg");
See Also
- CAObject::PictureToStream method
Comments
Enable comment auto-refresher