Accusoft NotateXpress 13
GetLayerIntoVariant Method
A variant to receive the annotation data.
The handle of a layer returned by the CreateLayer method.
The address of a long to receive the size of the byte array copied to the variant.
Description
Gets the current annotation data for the specified layer into a variant byte array.
Syntax
Visual Basic
Public Sub GetLayerIntoVariant( _
   ByRef v As Variant, _
   ByVal Layer As Long, _
   ByRef count As Long _
) 
Parameters
v
A variant to receive the annotation data.
Layer
The handle of a layer returned by the CreateLayer method.
count
The address of a long to receive the size of the byte array copied to the variant.
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
SubSaveLayerToDatabase(DBAsDatabase)
DimvAsVariant
DimcAsLong
DimrsAsRecordset

NotateXpress1.GetLayerIntoVariantv,NotateXpress1.CurrentLayer,c

'Oncethelayerdataisinavariant,youcanstoreitintoadatabase,etc.
'MsgBox"Lengthofdata="&Len(v)

Setrs=DB.OpenRecordset("Layers",dbOpenDynaset)
rs.AddNew
rs.LayerName=NXP1.LayerName
rs.NXPData.AppendChunkv
rs.Update
rs.Close
Setrs=Nothing

EndSub
See Also

NotateXpress Object  | NotateXpress Members  | Saving

 

 


©2018. Accusoft Corporation. All Rights Reserved.

Send Feedback