feat: follow connected DX minimize and restore state
This commit is contained in:
1 parent
b51bcb0b3e
commit
f3b027b494
10 files changed
+475
-2
No files matched your search
@@ -126,7 +126,9 @@ Sub DxBridgePublishSelection(runRoot, runId, snapshotId, _
|
||||
ByRef lastSelection, ByRef pageContext, ByRef pageKeys)
|
||||
Dim designPath, blockName, sheetName, currentContext, selectedKeys
|
||||
Dim text, numberJson, ready, newPageKeys
|
||||
Dim hostViewHandleJson
|
||||
On Error Resume Next
|
||||
hostViewHandleJson = DxBridgeHostViewHandleJson()
|
||||
designPath = DxBridgeDesignPath()
|
||||
blockName = DxBridgeCurrentBlockName()
|
||||
sheetName = DxBridgeCurrentSheetName()
|
||||
@@ -151,12 +153,13 @@ Sub DxBridgePublishSelection(runRoot, runId, snapshotId, _
|
||||
text = "{""state"":""unavailable"",""run_id"":""" & _
|
||||
DxToolsJson(runId) & """,""snapshot_id"":""" & _
|
||||
DxToolsJson(snapshotId) & """,""design_path"":""" & _
|
||||
DxToolsJson(designPath) & """}"
|
||||
DxToolsJson(designPath) & """,""host_view_handle"":" & hostViewHandleJson & "}"
|
||||
If ready Then
|
||||
text = "{""state"":""ready"",""run_id"":""" & _
|
||||
DxToolsJson(runId) & """,""snapshot_id"":""" & _
|
||||
DxToolsJson(snapshotId) & """,""design_path"":""" & _
|
||||
DxToolsJson(designPath) & """,""active_block_name"":""" & _
|
||||
DxToolsJson(designPath) & """,""host_view_handle"":" & hostViewHandleJson & _
|
||||
",""active_block_name"":""" & _
|
||||
DxToolsJson(blockName) & """,""current_sheet_name"":""" & _
|
||||
DxToolsJson(sheetName) & """,""current_sheet_number"":" & _
|
||||
numberJson & ",""selected_keys"":" & selectedKeys & _
|
||||
|
||||
@@ -154,6 +154,7 @@ Function DxRefreshSnapshot(runRoot, runId, objectMap, originalMap, _
|
||||
" ""snapshot_id"": """ & DxToolsJson(snapshotId) & """," & vbCrLf & _
|
||||
" ""design_id"": """ & DxToolsJson(designId) & """," & vbCrLf & _
|
||||
" ""design_path"": """ & DxToolsJson(designPath) & """," & vbCrLf & _
|
||||
" ""host_view_handle"": " & DxBridgeHostViewHandleJson() & "," & vbCrLf & _
|
||||
" ""active_block_name"": """ & _
|
||||
DxToolsJson(activeBlockName) & """," & vbCrLf & _
|
||||
" ""current_sheet_number"": " & currentSheetNumberJson & "," & vbCrLf & _
|
||||
@@ -168,6 +169,17 @@ Function DxRefreshSnapshot(runRoot, runId, objectMap, originalMap, _
|
||||
DxRefreshSnapshot = True
|
||||
End Function
|
||||
|
||||
Function DxBridgeHostViewHandleJson()
|
||||
Dim handle
|
||||
handle = 0
|
||||
On Error Resume Next
|
||||
handle = CLng(Application.ActiveViewHandle)
|
||||
If Err.Number <> 0 Then handle = 0
|
||||
Err.Clear
|
||||
On Error GoTo 0
|
||||
DxBridgeHostViewHandleJson = CStr(handle)
|
||||
End Function
|
||||
|
||||
Function DxBridgeExportAttributes(component)
|
||||
Dim attribute
|
||||
Dim text
|
||||
|
||||
Reference in new issue
Block a user