Hello Guest it is December 15, 2019, 02:17:28 AM

Author Topic: imagebox  (Read 2599 times)

0 Members and 1 Guest are viewing this topic.

imagebox
« on: January 28, 2016, 09:00:11 AM »
hi

is it possible to change picture (custom screen image object) i.e. change file path and update while mach3 is on?

i have a client that wants some sort of imagebox that shows a picture of the part program he load


/js

Offline RICH

*
  • *
  •  7,380 7,380
    • View Profile
Re: imagebox
« Reply #1 on: January 28, 2016, 09:06:16 AM »
Re: imagebox
« Reply #2 on: January 28, 2016, 09:38:55 AM »
thats pretty cool but not what im lookin for,
thats some sort of image trace function (i guess?)

my pic files are photos, not drawings

i need a load file button script that can load a gcode file and at the same time load a linked picture into an image place holder

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: imagebox
« Reply #3 on: January 28, 2016, 10:45:45 AM »
HIYA Rich, Ya tried hard this time. You get an A+

(;-) TP

Offline RICH

*
  • *
  •  7,380 7,380
    • View Profile
Re: imagebox
« Reply #4 on: January 28, 2016, 03:27:29 PM »
TP may have some insight on how to do it.  ;D
I am just a novice at programming and screen sets.

RICH

Offline ger21

*
  • *
  •  6,291 6,291
    • View Profile
    • The CNC Woodworker
Re: imagebox
« Reply #5 on: January 28, 2016, 04:07:48 PM »
Afaik, no, you can't.
The only things you can change on the fly are labels, I think.
Gerry

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

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

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: imagebox
« Reply #6 on: January 28, 2016, 04:33:07 PM »
Well actually NO you cannot , BUT yes you can, to a point.  The function Rich pointed out allows you to Pick a Gcode file BASED on a PICTURE of teh part. It is a What you see is what you get type thing. You can veiw all teh picture files one at a time from a directory and IF you select a picture it will load teh Gcode file of that picture ready for you to cut.

Gerry was correct in that Mach3 does not have images boxes on screens. You could create a function that IF you selected a Gcode file it COULD display teh associated PICTURE in a VB picture box on screen BUT it is not permanant in as soon as it looses focus it goes down to teh lower bar as an icon.

(;-) TP

Offline RICH

*
  • *
  •  7,380 7,380
    • View Profile
Re: imagebox
« Reply #7 on: January 28, 2016, 06:49:44 PM »
Terry,
In the cloud above my head............
Have the program  leave the Picture opened on the Desktop and the let it also load the file to Mach. So the picture is there, this way it is not  in the screen set, but provides a reference to view and can be closed. Don't know if leaving the picture open will cause problems with MAch when running.

Just a cloud in the air, FWIW

RICH

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: imagebox
« Reply #8 on: January 28, 2016, 07:06:02 PM »
Other thing I did for plasma cutting was create a picture book of plasma art. Each picture had a barcode embeded. Turn to the page and swipe teh barcode and it loaded the program for you.

With MANY hundreds of files that worked out well. If a customer wanted a certain thing all you had to do was write down teh page number on the order. But that book created another problem . With that many things to pick from it was very hard for them to make decision (;-)

Darned if you do and Darned if you don't, (;-) TP

Offline TPS

*
  •  1,411 1,411
    • View Profile
Re: imagebox
« Reply #9 on: January 29, 2016, 03:24:15 AM »
Hi,

that is how i did it two years ago.

script from the file open button:

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


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