AnsweredAssumed Answered

Reading Annotations with PISDK

Question asked by MaximeHT on Jun 26, 2015
Latest reply on Jul 17, 2015 by aseck

When I try to read annotations with this code :



      If bAvecAnnotation And Me._bAnnotated Then

                    ' oAFValue.GetAnnotation Disponible avec AFSDK pour .Net 4.0

           ' Sinon, avec .Net 3.5

           oPoint = CType(oAFAttribute.RawPIPoint, PISDK.PIPoint)


                    If oPoint IsNot Nothing Then

                retVal = oPoint.Data.ArcValue(tDateLecture, PISDK.RetrievalTypeConstants.rtAtOrBefore)

                retValAttr = retVal.ValueAttributes



                     nvAnn = retValAttr.Item("annotations") --> contains only "Annoted", "Questionnable" or "Substituted" elements, but not "annotations"

                     retAnns = CType(nvAnn.Value, PISDK.PIAnnotations) ' contains annotations collection object


                     If retAnns.Count > 0 Then

                                Me._sAnnotation = CType(retAnns(0), PISDK.PIAnnotation).Value.ToString()

                     End If


                Catch oExAnno As Exception

                     'Pas d'annotations ... ==> RAF

               End Try


                    End If

      End If


Note that this code runs under ACE context.

Is it necessary to use MTNVS (or MTNV) and a specific thread tor read and to write annotations with PI ACE code?