SetBlockAnnotation Method (ILeader)

SetBlockAnnotation Method (ILeader) | Send Feedback
See Also Example

BlockName
  Name of the Block definition to attach to the Leader (see Remarks)

InsertPoint
  Point where to attach the Block to the Leader

Attaches a Block instance to the Leader.

# Syntax

Visual Basic |
--- | ---
    Sub SetBlockAnnotation( _
       ByVal BlockName As System.String, _
       ByVal InsertPoint As MathPoint _
    )

C# |
--- | ---
    void SetBlockAnnotation(
       System.string BlockName,
       MathPoint InsertPoint
    )

JavaScript |
--- | ---
    SetBlockAnnotation(
       BlockName : String,
       InsertPoint : dsMathPoint
    )

COM native C++ |
--- | ---
    HRESULT SetBlockAnnotation(
       BSTR BlockName,
       IMathPoint* InsertPoint
    )

C++ |
--- | ---
    DSRESULT SetBlockAnnotation(
       const dsString& BlockName,
       dsMathPoint* InsertPoint
    )

#### Parameters

BlockName
  Name of the Block definition to attach to the Leader (see Remarks)
InsertPoint
  Point where to attach the Block to the Leader

# Example

Attach Block Definition Annotation to Leader (C#)
Attach Block Definition Annotation to Leader (VB.NET)
Attach Block Definition Annotation to Leader (VBA)
Attach Block Definition Annotatin to Leader (JavaScript)

# Remarks

You can create a Block definition using IDocument::CreateBlockDefinition. The name you specify for the BlockName parameter for IDocument::CreateBlockDefinition is the same name that you should specify for the BlockName parameter for ILeader::SetBlockAnnotation. When ILeader::SetBlockAnnotation executes, it creates a Block instance of the specified Block definition.

If a Block definition already exists, then you can get the existing Block definitions for a document using IDocument::GetBlockDefinitions and the name of each existing Block definition using IBlockDefinition::GetName. Use the desired name returned by IBlockDefinition::GetName for the BlockName parameter for ILeader::SetBlockAnnotation.

# See Also

####

ILeader Interface
ILeader Members
ILeader::GetBlockAnnotation Method
ILeader::RemoveAnnotation Method

# Availability

DraftSight V1R3.1