I am trying to add a block component to a point label style. I haven't figured out how to assign the block name once the component is created. The only thing I can find is component.Block.BlockName.Value. Is this possible or am I missing something simple?
Private Sub addBlockComponent(ByVal style As LabelStyle, ByRef blknam As String, blkht As Double)
Dim id As ObjectId = style.AddComponent("Block", LabelStyleComponentType.Block)
Dim component As LabelStyleBlockComponent = TryCast(id.GetObject(OpenMode.ForWrite), LabelStyleBlockComponent)
component.Block.BlockName.Value = blknam
component.Block.Attachment.Value = BlockAttachmentType.MiddleCenter
component.Block.BlockHeight.Value = blkht
component.Block.RotationAngle.Value = 0
End Sub