Accusoft NotateXpress 13
SetLayerFromVariant Method
Variant byte array containing a single layer of annotation data.
The handle of a layer.
Description
Sets the current annotation data for the specified layer into a variant byte array.
Syntax
Visual Basic
Public Sub SetLayerFromVariant( _
   ByRef v As Variant, _
   ByRef Layer As Long _
) 
Parameters
v
Variant byte array containing a single layer of annotation data.
Layer
The handle of a layer.
Remarks

The variant data will be in the format of the AnnotationType

The exception are that the NX_AnnotationType_I4W and NX_AnnotationType_TMS are not honored and will automatically try to use NX_AnnotationType_NXP 

Example
PublicSubLoadLayerFromDatabase(LayerNameAsString)
DimrsAsRecordset
DimtmpVAsVariant
DimqueryAsString
DimlayerHandleAsLong

'----------------------------
'weassumeherethatDBrepresentsanopendatabase
'withatablenamedLayer
'-----------------------------
query="Select*fromLayerswhereLayerName='"&LayerName&"'"

Setrs=DB.OpenRecordset(query,dbOpenSnapshot)
If(rsIsNothing)ThenExitSub
rs.MoveFirst

'----------------------------
'readtherecordintothevariant
'----------------------------
'NXPDataisthememo/binaryfield
'----------------------------
tmpV=rs!NXPData.GetChunk(0,rs!NXPData.FieldSize)

'----------------------------
'tellNotateXpresstoretrieveannotationsfrom
'thisvariant
'----------------------------
NotateXpress1.SetLayerFromVarianttmpV,layerHandle

IfNot(rsIsNothing)Then
rs.Close
Setrs=Nothing
EndIf
See Also

NotateXpress Object  | NotateXpress Members  | Loading

 

 


©2015. Accusoft Corporation. All Rights Reserved.

Send Feedback