Marco
2 months agoContributor II
How can I assign a new value to an entity that is not the POV of my Data Management?
Hi Everyone.
I would like to know how I can perform a setdatacell on an entity that is not in my Data Management configuration. I obtain the value of the entity from Text 1 of my entity assigned to the POV, but it does not allow me to apply a setdatacell or a calculate to assign a new value to that entity. Therefore, I would like to know how I can achieve this.
My Data management configuration:
The example code I am using:
Dim strEntity As String = api.Pov.Entity.Name
Dim strScenario As String = api.Pov.Scenario.Name
Dim strTime As String = api.Pov.Time.Name
Dim povEntityId As Integer = api.Pov.Entity.MemberId
Dim strEntTx1 As String = api.Entity.Text(povEntityId, 1)
'setdatacell
api.Data.SetDataCell("S#[" & strScenario & "]:T#" & strTime & ":E#" & strEntTx1 & ":A#S_ConvFactorInner:O#BeforeAdj:U1#D0000:U2#P0000:U3#LOCAL_DATA:U4#PJ00000:U5#None:U6#None:U7#None:U8#None",totAll,False,True)
'Data.Calculate
api.Data.Calculate("Cb#HLFPLN:S#[" & strScenario & "]:T#" & strTime & ":E#" & strEntTx1 & ":A#S_ConvFactorInner:V#Periodic:C#Local:F#None:O#BeforeAdj:I#None:U1#D0000:U2#P0000:U3#LOCAL_DATA:U4#PJ00000:U5#None:U6#None:U7#None:U8#None = (" & totAll.ToString & ")",True)