←Select platform

FindObjectById Method

Summary

Finds the specified AnnAutomationObject by id.

Syntax
C#
VB
Objective-C
C++
Java
public AnnAutomationObject FindObjectById( 
   int id 
) 
Public Function FindObjectById( _ 
   ByVal id As Integer _ 
) As AnnAutomationObject 
-(LTAnnAutomationObject*) findObjectById:(int) anID; 
public AnnAutomationObject findObjectById(int 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.Engine; 
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 20.0.2020.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Annotations.Automation Assembly