|
DigiPara Liftdesigner LDX API
|
API method: ILDXObjectStorages5.AddText
Treename: Sheets.Storage.API example storage text
' from Samples/Src/LDXAPIExamples/Example_LDXObjectStorages.vb
<APIHelpAttribute(APIHelpModes.FireCalcModel Or APIHelpModes.LoadLD3File, {APIHelpModes.InputParaLDXDoc}, "Sheets.Storage.API example storage text", "LDXObjectStorages~AddText", "Add storages")>
Public Shared Sub AddStorages(ByRef ldxDocument As DigiPara.LDX.LDXDocument)
If ldxDocument.GetLDXObject("Sheets.Storage.") Is Nothing Then
MsgBox("Sheet storages not found!")
Exit Sub
End If
Dim sheetsStorages As DigiPara.LDX.LDXObjectStorages = ldxDocument.Sheets.Object.GetStorages()
Dim textValue As String = "Sheet count is " & ldxDocument.Sheets.Count.ToString
Dim dimValue As Double = ldxDocument.Shaft.PIT
' set a storage text
Dim ldxObjectStorageText As DigiPara.LDX.LDXObjectStorageText = sheetsStorages.AddText(textKey, textValue)
' set a storage dimension (double value)
Dim ldxObjectStorageDim As DigiPara.LDX.LDXObjectStorageDim = sheetsStorages.AddDim(dimKey, dimValue)
' retrieve the text
Dim ret As String = sheetsStorages.GetText(textKey)
End Sub