LEADTOOLS JavaScript (Leadtools.Annotations.Automation)
LEAD Technologies, Inc

FindObjectById Method

Example 
The id of the AnnAutomationObject to find.
Finds the specified AnnAutomationObject.
Syntax
 function Leadtools.Annotations.Automation.AnnAutomationManager.findObjectById( 
   id 
)

Parameters

ParameterTypeDescription
idintThe id of the AnnAutomationObject to find.

Return Value

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

The possible values for id are:

This method enumerates all of the AnnAutomationObject items in the Objects collection and compares AnnAutomationObject.Id with id.

Example

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

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

Reference

AnnAutomationManager Object
AnnAutomationManager Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.