Hello Guest it is March 28, 2024, 01:30:07 PM

Author Topic: BMP automatic update  (Read 4737 times)

0 Members and 1 Guest are viewing this topic.

Offline TPS

*
  •  2,501 2,501
    • View Profile
BMP automatic update
« on: September 16, 2014, 07:43:15 AM »
hi,

is there any possibility to update a BMP picture during runtime ?

mine is only update if i start the software.

Thanks Thomas
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: BMP automatic update
« Reply #1 on: September 16, 2014, 07:50:33 AM »
What are  you trying to do?
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: BMP automatic update
« Reply #2 on: September 16, 2014, 08:52:42 AM »
Hello Gerry,

sorry for the bad explaining.

my self written postprozessor is creating now a picture (BMP) of the coresponding
cnc program with the finished part.

what i am trying to do is to display this pricture on my screenset.

-i created a picuturebox in my screenset witch is diplaying the file part.bmp
-in my load G-code button a script is loading the g-code file (no problem) and it is doing a filecopy from actpart.bmp to the part.bmp
an here starts my problem, because the picturebox is not updated dynamicly. if i reload the screenset or stop and start Mach3 software
the picture is updated.

-in my close file button a script close the g-code file (no problem) and does a filecopy from blank.bmp to part.bmp and of course
the same problem with the update.

hope you understand now what i am trying to do.
any other solution is welcome.

Thanks Thomas





anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: BMP automatic update
« Reply #3 on: September 16, 2014, 09:06:59 AM »
OK, that's a very clear explanation.
Unfortunately, I don't know of anyway to get Mach3 to update the screen.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: BMP automatic update
« Reply #4 on: September 17, 2014, 02:43:28 AM »
OK i found a solution.

here the code:
Code: [Select]
Dim objDialog
Dim filesys
set filesys=CreateObject("Scripting.FileSystemObject")



' Create a dialog object
Set objDialog = CreateObject( "UserAccounts.CommonDialog" )
objDialog.InitialDir = "C:\Programme\Platemaster\Projekte"
objDialog.Filter = "Programm|*.tap"
' Open the dialog and return the selected file name
If objDialog.ShowOpen Then


If filesys.FileExists(Left(objDialog.FileName, Len(Trim(objDialog.FileName)) - 4) + ".bmp") Then
filesys.CopyFile Left(objDialog.FileName, Len(Trim(objDialog.FileName)) - 4) + ".bmp", "C:\Mach3\Bitmaps\Platemaster\Anzeige.BMP"
    End If
LoadStandardLayout()
Sleep(3000)
LoadFile(objDialog.FileName)

Else
GetFileName = ""
End If

ok its reloading the whole screenset and not only the bitmap, but its working.

Thomas
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.