←Select platform

CurrentObjectId Property

Summary
Gets or sets the current automation object ID.
Syntax
C#
Objective-C
C++/CLI
Java
Python
public int CurrentObjectId { get; set; } 
@property (nonatomic, assign) NSInteger currentObjectId; 
public int getCurrentObjectId() 
public void setCurrentObjectId(int id) 
public:  
   property Int32 CurrentObjectId 
   { 
      Int32 get() 
      void set(Int32 value) 
   } 
CurrentObjectId # get and set (AnnAutomationManager) 

Property Value

The current automation object ID. The default value is AnnObject.None

Remarks

The current automation object ID is the AnnAutomationObject.Id of the AnnAutomationObject currently selected. This object is the "active" object to be drawn on the current active AnnAutomation.

The CurrentObjectIdChanged event is fired when this property is changed.

Example
C#
using Leadtools.Annotations.Automation; 
 
using Leadtools.Annotations.Engine; 
using Leadtools.Codecs; 
using Leadtools.Controls; 
using Leadtools.Annotations.Rendering; 
using Leadtools.Annotations.WinForms; 
 
public void AnnAutomation_Draw() 
{ 
   // Hook to the automation's Draw event 
   _automation.Draw += _automation_Draw; 
} 
 
void _automation_Draw(object sender, AnnDrawDesignerEventArgs e) 
{ 
   // Check if we are drawing a line and we just started, if so, cancel it 
   if (_automation.Manager.CurrentObjectId == AnnObject.LineObjectId && 
      e.OperationStatus == AnnDesignerOperationStatus.Start) 
   { 
      Debug.WriteLine("Canceling line..."); 
      e.Cancel = true; 
   } 
} 
Requirements

Target Platforms

Help Version 22.0.2023.4.25
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Annotations.Automation Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.