Finds the specified AnnAutomationObject by id.
public AnnAutomationObject FindObjectById(int id)
Public Function FindObjectById( _ByVal id As Integer _) As Leadtools.Annotations.Automation.AnnAutomationObject
public Leadtools.Annotations.Automation.AnnAutomationObject FindObjectById(int id)
-(LTAnnAutomationObject*) findObjectById:(int) anID; public AnnAutomationObject findObjectById(int id) function Leadtools.Annotations.Automation.AnnAutomationManager.FindObjectById(id)
public:AnnAutomationObject^ FindObjectById(Int32 id)
id
The id of the AnnAutomationObject to find.
The AnnAutomationObject for the specified id, or null if no AnnAutomationObject with that id can be found.
The possible values for id are:
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.
This example changes the line color of new line automation objects to blue:
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 objectAnnAutomationObject obj = _automation.Manager.FindObjectById(AnnObject.LineObjectId);if (obj != null){obj.ObjectTemplate.Stroke = AnnStroke.Create(AnnSolidColorBrush.Create("Blue"), LeadLengthD.Create(2));}}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
