![]() |
KnowBrainer Speech Recognition | ![]() |
Topic Title: Savings DATS Topic Summary: methods to save dATS Created On: 01/11/2021 09:46 AM Status: Post and Reply |
|
![]() |
![]() |
- Charlie | - 01/11/2021 09:46 AM |
![]() |
![]() |
- Alan Cantor | - 01/11/2021 02:28 PM |
![]() |
![]() |
- Charlie | - 01/11/2021 03:39 PM |
![]() |
![]() |
- Alan Cantor | - 01/11/2021 04:52 PM |
![]() |
![]() |
- Charlie | - 01/11/2021 05:19 PM |
![]() |
![]() |
- Alan Cantor | - 01/11/2021 10:01 PM |
![]() |
![]() |
- Alan Cantor | - 01/12/2021 11:50 AM |
![]() |
|
Has anyone come up with a macro or method to save dats other then selecting them in each directory and saving?
|
|
|
|
![]() |
|
What does "DATS" mean?
|
|
|
|
![]() |
|
sorry dragon commands saved as dat files.
There are a few old posts on forum mentioning some macros to automate saving commands but they dont seem to work, but posts are old.
|
|
|
|
![]() |
|
The old commands are probably still valid. Consider posting one of the commands here so we can get a better idea of what you have in mind.
|
|
|
|
![]() |
|
Alternatively, only if you want to export all your commands (.dat format only) you can use the following cool script created by Lindsay Adam. It's a huge timesaver! I named it:
Export Now
Sub Main Dim eng As New DgnEngineControl commandsFileLocation = eng.SpeakerDirectory & eng.Speaker & "\Current\MyCmds.dat" newCommandsFile = " " & Format (Now, "mm-dd-yyyy") & ".dat" FileCopy commandsFileLocation, "E:\Dragon Commands\" + newCommandsFile End Sub
E:\Dragon Commands is my file save location. You can replace it with your own path. The produced file (only takes a second) will be named the current date i.e 09-17-2020
Option Explicit Sub Main
Dim fso, commandsFileLocation, newCommandsFile
Dim eng As New DgnEngineControl
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FolderExists("H:\Documents\Dragon\") Then
commandsFileLocation = eng.SpeakerDirectory & eng.Speaker & "\Current\MyCmds.dat"
newCommandsFile = "My Commands Backup " & Format (Now, "dd-mm-yyyy") & ".dat"
FileCopy commandsFileLocation, "H:\Documents\Dragon\" + newCommandsFile
'Messagebox courtesy of pgInfoBox (C) 2013 PG Service
pgInfoBox("Your commands are backed up.",1) ' if num = 0, no auto-dismiss
Else
fso.CreateFolder("H:\Documents\Dragon\")
commandsFileLocation = eng.SpeakerDirectory & eng.Speaker & "\Current\MyCmds.dat"
newCommandsFile = "My Commands Backup " & Format (Now, "dd-mm-yyyy") & ".dat"
FileCopy commandsFileLocation, "H:\Documents\Dragon\" + newCommandsFile
pgInfoBox("The folder has been created and your commands backed up",1) ' if num = 0, no auto-dismiss
End If
End Sub
Function pgInfoBox(dispText As String, dispTime As Integer)
' An auto-dismissing MsgBox (courtesy of MS Windows Scripting Host)
' Reference: Popup Method at http://msdn.microsoft.com/en-us/library/x83z1d9f(v=vs.84).aspx
Dim ib
Set ib = CreateObject("WScript.Shell")
pgInfoBox = ib.Popup(dispText & vbCrLf & " " & vbCrLf _
& "Click OK (or just wait . . .)", 4, _
"Dragon Commands Backup Message", 0)
Set ib = Nothing
End Function
|
|
|
|
![]() |
|
What isn't working? Both examples look OK to me.
|
|
|
|
![]() |
|
I just tried Lindsay's first example, and it worked. Here's how to do it: |
|
|
FuseTalk Standard Edition v4.0 - © 1999-2022 FuseTalk™ Inc. All rights reserved.