' Unified design-bridge entry for DxDesigner 7.9.5. Keep this file ASCII-only. ' Loaded by MenuAdd.vbs through ExecuteGlobal; relies on the DxToolsHome ' global that MenuAdd resolves before any menu action runs. Sub DxToolsDesignBridgeEnsureCore() If Not IsEmpty(DxToolsDesignBridgeCoreLoaded) Then Exit Sub If DxToolsHome = "" Then MsgBox DxToolsPathErrorMessage(), vbExclamation Err.Raise vbObjectError + 799, "DxToolsDesignBridgeEnsureCore", _ "DxToolsHome is not resolved" End If Dim fso Dim coreRoot Set fso = CreateObject("Scripting.FileSystemObject") coreRoot = fso.BuildPath(DxToolsHome, "_runtime\vbs") If Not fso.FolderExists(coreRoot) Then coreRoot = fso.BuildPath(DxToolsHome, "core") End If Call DxToolsLoadScript(fso.BuildPath(coreRoot, "Snapshot.vbs")) Call DxToolsLoadScript(fso.BuildPath(coreRoot, "Transaction.vbs")) Call DxToolsLoadScript(fso.BuildPath(coreRoot, "Mailbox.vbs")) Call DxToolsLoadScript(fso.BuildPath(coreRoot, "BomExport.vbs")) DxToolsDesignBridgeCoreLoaded = True End Sub Sub DxToolsRunDesignBridge(featureKey) If DxToolsHome = "" Then MsgBox DxToolsPathErrorMessage(), vbExclamation Exit Sub End If On Error Resume Next Call DxToolsDesignBridgeEnsureCore() If Err.Number <> 0 Then Err.Clear On Error GoTo 0 Exit Sub End If On Error GoTo 0 If Not DxToolsHasActiveView() Then MsgBox DxToolsNoActiveViewMessage(), vbExclamation Exit Sub End If Call DxToolsDesignBridgeStart(CStr(featureKey)) End Sub Function DxToolsHasActiveView() Dim view DxToolsHasActiveView = False On Error Resume Next Set view = ActiveView If Err.Number = 0 And Not view Is Nothing Then DxToolsHasActiveView = True End If Err.Clear On Error GoTo 0 End Function Function DxToolsNoActiveViewMessage() DxToolsNoActiveViewMessage = ChrW(&H8BF7) & ChrW(&H5148) & _ ChrW(&H6253) & ChrW(&H5F00) & ChrW(&H5DE5) & ChrW(&H7A0B) & _ ChrW(&H5E76) & ChrW(&H8FDB) & ChrW(&H5165) & ChrW(&H539F) & _ ChrW(&H7406) & ChrW(&H56FE) & ChrW(&H9875) & ChrW(&H540E) & _ ChrW(&H518D) & ChrW(&H4F7F) & ChrW(&H7528) & ChrW(&H5DE5) & _ ChrW(&H5177) End Function Function DxToolsPathErrorMessage() DxToolsPathErrorMessage = ChrW(&H65E0) & ChrW(&H6CD5) & _ ChrW(&H786E) & ChrW(&H5B9A) & ChrW(&H5DE5) & ChrW(&H5177) & _ ChrW(&H76EE) & ChrW(&H5F55) End Function