findObjectById Method (AnnAutomationManager)

Summary

Finds the specified AnnAutomationObject by id.

Syntax

JavaScript Syntax
AnnAutomationManager.prototype.findObjectById = function(id)
TypeScript Syntax
findObjectById(id: number): AnnAutomationObject;

Parameters

id

The ID of the AnnAutomationObject to find.

Return Value

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

Example

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

JavaScript Example
example: function SiteLibrary_DefaultPage$example() { 
   // find the line automation object 
   var obj = this._automation.get_manager().findObjectById(lt.Annotations.Core.AnnObject.lineObjectId); 
   if (obj != null) { 
      obj.get_objectTemplate().set_stroke(lt.Annotations.Core.AnnStroke.create( 
         lt.Annotations.Core.AnnSolidColorBrush.create("blue"), 
         lt.LeadLengthD.create(2))); 
   } 
}, 

Requirements

Target Platforms

Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
Leadtools.Annotations.Automation Assembly
Click or drag to resize