Announcement

Collapse
No announcement yet.

Data Sharing: Can I use a string variable to name my map key?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Data Sharing: Can I use a string variable to name my map key?

    Hi,

    I have to send a network name and segment to an external application. Its important that this string is sent or none of our advertisements will work properly.

    I have a control text field for network name that is populated by attributes in MCP which will be filled in automatically from our database.

    I've tried it on my script which is compiling. Has anyone ever done this? Thanks.

    Code:
    dim NetworkC as Container = FindSubContainer("NETWORK")
    dim SegmentNoS as String
    
    sub SendTrigger()
     SegmentNoS = System.Map[NetworkC.Geometry.Text & "_Segment"]
     System.StartApplication("......" & Network.Geometry.Text & "........." & SegmentNoS & ".......")
    end sub
    Last edited by clopez11; 06-25-2018, 05:13 PM.

  • #2
    I think I may have answered my own question. But let me know if you have a better explanation on this. Thanks again.

    OnSharedMemoryVariableChanged(map As SharedMemory, mapKey As String)

    Does anyone know how to access the mapkey?
    Last edited by clopez11; 06-25-2018, 11:49 AM.

    Comment


    • #3
      Here i use mapKey for triggering text change by registering a callback. Hope its useful to you

      sub OnInit()
      VizCommunication.map.RegisterChangedCallback("/test1/t1")
      end sub


      sub OnSharedMemoryVariableChanged(map As SharedMemory, mapKey As String)
      if mapKey = "/test1/t1" then
      this.geometry.text = VizCommunication.map["/test1/t1"]
      end if
      end sub
      Last edited by Novacane89; 06-26-2018, 12:39 PM.

      Comment


      • #4
        Thanks again Novacane89

        I'll give it a try.

        Comment

        Working...
        X