Error processing SSI file
(Leadtools.Annotations.Automation)

Show in webframe

CurrentEditObject Property






Gets the current AnnObject being edited.
Syntax
public AnnObject CurrentEditObject {get;}
'Declaration
 
Public ReadOnly Property CurrentEditObject As AnnObject
public AnnObject CurrentEditObject {get;}
@property (nonatomic,retain,readonly) LTAnnObject* currentEditObject;
public AnnObject getCurrentEditObject()
 get_CurrentEditObject(); 

Property Value

The current AnnObject being edited; null if no objects are currently being edited.
Remarks

The current object being edited is the AnnObject currently "selected" where its AnnEditDesigner is currently active.

This is the object that will be processed when calling any of the object processing methods of this AnnAutomation.

You can change the CurrentEditObject by calling SelectObject or SelectObjects.

Example

This example changes the stroke of the object that is currently being edited to a red stroke that has a length of 2.

Copy Code  
using Leadtools.Annotations.Automation;
using Leadtools.Annotations.Core;
using Leadtools.Codecs;
using Leadtools.Controls;
using Leadtools.Annotations.Rendering;
using Leadtools.Annotations.WinForms;

[TestMethod]
public void AnnAutomation_CurrentEditObject()
{
   // check if an object is currently "selected"
   AnnObject currentEditObject = _automation.CurrentEditObject;
   if (currentEditObject != null)
   {
      // check if this object supports a stroke
      if (currentEditObject.SupportsStroke)
      {
         // change its stroke
         _automation.BeginUndo();
         currentEditObject.Stroke = AnnStroke.Create(AnnSolidColorBrush.Create("Blue"), LeadLengthD.Create(2));
         _automation.EndUndo();
         _automation.Invalidate(LeadRectD.Empty);
      }
      else
      {
         Debug.WriteLine("This object does not support stroke, select another object");
      }
   }
   else
   {
      Debug.WriteLine("Select an object first");
   }
}
using Leadtools.Annotations.Automation;
using Leadtools.Controls;
using Leadtools.Converters;
using Leadtools.Annotations.Core;
using Leadtools.Codecs;

[TestMethod]
public void AnnAutomation_CurrentEditObject()
{
   // check if an object is currently "selected"
   AnnObject currentEditObject = _automation.CurrentEditObject;
   if (currentEditObject != null)
   {
      // check if this object supports a stroke
      if (currentEditObject.SupportsStroke)
      {
         // change its stroke
         _automation.BeginUndo();
         currentEditObject.Stroke = AnnStroke.Create(AnnSolidColorBrush.Create("Blue"), LeadLengthDHelper.Create(2));
         _automation.EndUndo();
         _automation.Invalidate(LeadRectDHelper.Empty);
      }
      else
      {
         Debug.WriteLine("This object does not support stroke, select another object");
      }
   }
   else
   {
      Debug.WriteLine("Select an object first");
   }
}
Requirements

Target Platforms

See Also

Reference

AnnAutomation Class
AnnAutomation Members

Error processing SSI file
  Leadtools.Annotations.Automation requires a Document or Medical toolkit license and unlock key. For more information, refer to: LEADTOOLS Toolkit Features