Sets the current annotation data for the specified layer into a variant byte array.
- v
- Variant byte array containing a single layer of annotation data.
- Layer
- The handle of a layer.
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
SetLayerFromVariant (Visual Basic) | ![]() |
---|---|
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 |