Error processing SSI file
LEADTOOLS JavaScript (Leadtools.Annotations.Automation)

FindObjectById Method

Show in webframe
Example 
The ID of the AnnAutomationObject to find.
Finds the specified AnnAutomationObject by id.
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 as follows:

You can also use FindObject if you have an instance of AnnObject and want to find the automation object associated with its type.

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

Example

The following 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(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)));
   }
},
See Also

Reference

AnnAutomationManager Object
AnnAutomationManager Members

Error processing SSI file