Skip to main content
Contributor
Aug 22, 2023 10:02 AM UTC
Solved

Can I use api.data.calculate to insert text?

Hi Team,

I wanted to insert a text to data cell (for example 'Add comment'). Is it possible to be done by using api.data.calculate?

This is how I see this:

Dim Comment As String = "Add comment"

api.data.calculate("V#Annotation:A#xxx:F#xxx:O#xxx:I#xxx:U1#xxx:U2#xxx:U3#xxx:U4#xxx:U5#xxx:U6#xxx:U7#xxx:U8#xxx=" & Comment)

 

Thanks a lot!

 

Member
Aug 22, 2023 10:37 AM UTC

Hi Kamila

There is a api.Data.SetDataAttachmentText( ) function to use for setting text annotations

So something like this will work:
api.Data.SetDataAttachmentText("V#Annotation:A#xxx:F#xxx:O#xxx:I#xxx:U1#xxx:U2#xxx:U3#xxx:U4#xxx:U5#xxx:U6#xxx:U7#xxx:U8#xxx", False)

 

The false prevent  text accumulating if text already exists in the POV so can be toggled on or off

2 replies

Member
Aug 22, 2023 10:37 AM UTC

Hi Kamila

There is a api.Data.SetDataAttachmentText( ) function to use for setting text annotations

So something like this will work:
api.Data.SetDataAttachmentText("V#Annotation:A#xxx:F#xxx:O#xxx:I#xxx:U1#xxx:U2#xxx:U3#xxx:U4#xxx:U5#xxx:U6#xxx:U7#xxx:U8#xxx", False)

 

The false prevent  text accumulating if text already exists in the POV so can be toggled on or off

KamilaAuthor
Contributor
Aug 23, 2023 11:12 AM UTC

Thank you Mark, much appreciated!