Tx Message From Transmit List Doc(.xmt) to Receive/transm

Comprehensive CAN monitor for Windows® and its add-ins: Plotter, CANdb Import, Instruments Panel, and J1939
Post Reply
Lufyoooo
Posts: 3
Joined: Mon 4. Mar 2013, 12:43

Tx Message From Transmit List Doc(.xmt) to Receive/transm

Post by Lufyoooo » Mon 4. Mar 2013, 13:07

Hi ,

I want to add all my tx message from transmit list document (.xmt) to "Receive/Transmit" window.
by using code(Macro file)

I'm able to open my transmit list document ,
"Set doc = Documents.Open("$(CurDir)\Mytransmit.xmt",,True) "

I saw the document and send all messages. but I can't see it from "Receive/Transmit" window.

and now I want to pause all the message
"Connections.TransmitMessages.PauseAll"
this code only work to pause all message in "Receive/Transmit" window. I want to pause all my message in "Mytransmit.xmt".

Do you know how to put the message from Mytransmit.xmt to "Receive/Transmit" window?

Thanks before.

K.Wolf
Software Development
Software Development
Posts: 141
Joined: Wed 22. Sep 2010, 15:37

Re: Tx Message From Transmit List Doc(.xmt) to Receive/tra

Post by K.Wolf » Mon 4. Mar 2013, 15:50

Hi,

Transmit List documents are always opened in a separate document window. The messages in the Receive/Transmit window are stored in the project file.
There is no easy way to put all messages from the transmit list document into the Receive Transmit window. In the user interface you could use the File->Import command, but this function cannot be automated through a macro without user interaction.
But you can control the messages in the transmit list window:

Code: Select all

Set doc = Documents.Open("$(CurDir)\Mytransmit.xmt",,True) 
doc.ActiveWindow.Object.Messages.PauseAll
The Connections.TransmitMessages collection only represents the transmit list in the Receive/Transmit window. But each open transmit list window has its own TransmitMessages collection, which you can control in the same way.

Lufyoooo
Posts: 3
Joined: Mon 4. Mar 2013, 12:43

Re: Tx Message From Transmit List Doc(.xmt) to Receive/tra

Post by Lufyoooo » Tue 5. Mar 2013, 10:48

Hi ,

Thank you for your reply ,

I tried this example from help file and give warning ( how to fix this warning ?)
Sub KindExample()

' Open a text document before executing this example

Dim objDoc

Set objDoc = ActiveDocument

MsgBox "Kind of the active document: " & objDoc.Kind

End Sub


Your code

Set doc = Documents.Open("$(CurDir)\Mytransmit.xmt",,True)
doc.ActiveWindow.Object.Messages.PauseAll


I tried this code, and this code only for one spesific file,

and I want to Pause all my transmit list file which are opened or activate in window

so I do

dim win
For Each win In Windows

If win = Windows(peDocumentKindTransmit) Then
win.Object.Messages.PauseAll
end if

Next

it's work,
but it's only work to pause only one file not all my all active transmit file .

do you know how to pause all active transmit file at window?

Thank you

K.Wolf
Software Development
Software Development
Posts: 141
Joined: Wed 22. Sep 2010, 15:37

Re: Tx Message From Transmit List Doc(.xmt) to Receive/tra

Post by K.Wolf » Tue 5. Mar 2013, 16:05

Hi,

try this code:

Code: Select all

Dim win
For Each win In Windows
  If win.Kind = peDocumentKindTransmit Then
    win.Object.Messages.PauseAll
  End If
Next

Post Reply