←Select platform

FindObjectById Method

Summary

Finds the specified AnnAutomationObject by id.

Syntax

C#
VB
Java
Objective-C
WinRT C#
C++
public AnnAutomationObject FindObjectById( 
   int id 
) 
Public Function FindObjectById( _ 
   ByVal id As Integer _ 
) As Leadtools.Annotations.Automation.AnnAutomationObject 
-(LTAnnAutomationObject*) findObjectById:(int) anID; 
public AnnAutomationObject findObjectById(int id) 
 function Leadtools.Annotations.Automation.AnnAutomationManager.FindObjectById(  
   id  
) 
public:  
   AnnAutomationObject^ FindObjectById( 
      Int32 id 
   ) 

Parameters

id
The id of the AnnAutomationObject to find.

Return Value

The AnnAutomationObject for the specified id, or null if no AnnAutomationObject with that id can be found.

Example

This example changes the line color of new line automation objects to blue:

C#
using LeadtoolsExamples.Common; 
using Leadtools.Annotations.Automation; 
using Leadtools.Annotations.Core; 
using Leadtools.Codecs; 
using Leadtools.Controls; 
using Leadtools.Annotations.WinForms; 
using Leadtools.Annotations.Rendering; 
 
public void AnnAutomationManager_FindObjectById() 
{ 
   // find the line automation object 
   AnnAutomationObject obj = _automation.Manager.FindObjectById(AnnObject.LineObjectId); 
   if (obj != null) 
   { 
      obj.ObjectTemplate.Stroke = AnnStroke.Create(AnnSolidColorBrush.Create("Blue"), LeadLengthD.Create(2)); 
   } 
} 

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Annotations.Automation Assembly