Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

pkrzic

Verified Members
  • Posts

    37
  • Joined

  • Last visited

Recent Profile Visitors

470 profile views

pkrzic's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. But there is still no sign of "X2_Add_Ons" folder or "MD_CD_PST Path Utility (X2-MR2).zip"....
  2. Helho, I can't find this utility any more. Could anybody please attach a link to this utility. Thanks.
  3. Hello, My company just bought an old 5-axis machine with a FIDIA M20 control. We got no additional documentation about programming this control. I searched through internet but I could not find any downloadable operator's/programming manual.(Heidenhain, Fanuc and Sinumeric manuals are all easy to find and free to download). Does any one know where could I find an operator's/programming manual for this control? Thanks.
  4. Try thi one: http://filebase.heidenhain.de/doku/tnc_gui...0-xx/en/bhb.pdf
  5. Hello, I believe there is a way (and not only one). Here is how I would do it: - create a txt file (like customers.txt). this file will contain your customers (every line - one customer). - use functions like code: OpenAsTextStream to read this file. Here is some small example: of reading a text file line by line: code: strfile = c:customer.txt 'path to your txt file Set FSO2 = CreateObject("Scripting.FileSystemObject") Set TS = FSO2.GetFile(strFile) Set fsoTextFile = TS.OpenAsTextStream(1, -2) While fsoTextFile.AtEndOfLine <> True customer = fsoTextFile.ReadLine Wend - there is of course some more things to do: every time the while loop reads a line the script should count the number of the line (like: customer # = line #), if the input number of the customer is some other text (for instance: new customer name) the script shoud not go into the read file loop. Instead it should write a new line into the file at the and of this file (look at the help file for the writing mathod). - of course you can use similar methods to read the whole file and determine the number of customers, their names,... This information can help you improve user interface. I believe there are some more experineced VBS gurus on this forum like BULLINESS, etc., who can help much more than I can (I believe they would do it some other, more efficient way). I hope you will find this information useful. Pkrzic
  6. Bullines, I run MCAM X SP1 and MCAM X MR1 PC1. It does not work in both of them. Maybe it is a problem that this code is just a part of a script (it does some other things than just deleting entities). I can email you my whole *.vbs file.
  7. Bullines, I tried your method, but was not successful. I've ran out of ideas. Do you have any more ideas on how to fully erase all elements from a certain level (without using functions such as RAM SAVER or SCREEN REGENERATE)? Thanks.
  8. Tried this, but unsuccesfully. I also tried a Call RunMastercamCommand("OnScreenRegenerate"), but the function opens a YES/NO message. User must then click the YES button in order to continue the run of the script. This is not OK for me - I want to run it automaticly. All I want is to delete all elements from certain level (for instance level 10501)! Thanks for help.
  9. Hello, I have a problem with deleting entities using VBS function DeleteEntity(). The problem is that after deleting elements they still remain on the screen. To put it a little different: the elements are deleted from the database (I can not select them with a cursor...), but their image still remains on the screen. The use of screen repaint doesn't help. The only thing that erases these "phantom" elements from the screen is the RAM SAVER. I don't like this method because it takes too much time on the bigger models. Is there any better way to totally delete entities from the screen. Here is a sample of my code: code: Sub Brisanje() Dim bRet, level Dim intelementCount Dim objShell Set objShell = CreateObject("WScript.Shell") UnselectAll() bRet = StartDBSearch(mc_alive, mc_linetype) If bRet Then Do While bRet level = GetEntityLevel() bRet = GetEntityEptr() if level = 10501 then DeleteEntity(bRet) end if bRet = NextDBSearch Loop Else ShowString("There is no elements on the screen!") End If ' Call RunMastercamCommand("RAMSaver") ' objShell.SendKeys "{ENTER}" ' objShell.SendKeys "{ENTER}" End Sub
  10. If I put the cursor to the graphic window during Script run it works OK, if I put the cursor on the Operation manager Mastercam crashes. Do you know of any function I could use to move cursor in the certain point on the screen?
  11. No it does not. I have tried many different combinations of this function with no succes. Only moving the mouse works so far. Thanks for the quick reply.
  12. OK, now I have another problem. I wrote a script that creates 3 images of the model on the screen. On the rough it works like this: - change background color to White - set Gview to ISO - refresh the screen - call function "To clipboard" - call Irfan executable to process the image from clipboard and save it as .PNG image - change Gview to TOP - do it all over again - Change Gview to side - do it all over again Why did I take function "To clipboard"? Because I could not get good results with "Metafile" (not shaded) and "BMP" (only 256x256 pixels). Is there any better solution to create an image of the screen? And I have another problem: When the script is changing view (for instance from ISO to TOP) the screen doesn't get refreshed . As you can see from the script I use "Call RepaintScreen(True)" function. The refreshment is done only if I move the mouse cursor during the running of the script. You can imagine that every tume I run the script I move a mouse like mad all over the table. I also noticed that this problem occurs with bigger models (>500 sufs) - with smaller models it works OK. Have you seen and/or solved any problem like this? Here is the code: code: Public Function CreateImage(strGetpath1, FolderIrfan, strimage, strimage1, strimage2) Dim strPathToConv Dim strCnvtImage Dim objFSO ' FSO object Dim objWSHShell ' WSH Shell object Dim objShell Dim krneki Dim iSeconds iSeconds = 15 Set objShell = CreateObject("WScript.Shell") Set objFSO = CreateObject("Scripting.FileSystemObject") strPathToConv = FolderIrfan & "i_view32.exe " ' objShell.SendKeys "{F9}" 'Call RunMastercamCommand("OnHideToolpath") Call SetBackGroundColor(mcCOLOR_WHITE) SetGViewNumber(mcVIEW_ISO) ' Isometric view Call RepaintScreen(True) ' Repaint screen Call RunMastercamCommand("OnScreenFit") Call Nap(iSeconds) ' Slow down processing a bit - it works better ' I use a method of pinging?! Call RepaintScreen(True) ' Another repaint ClearMenuAndPrompts Call RunMastercamCommand("ToClipboard") ' Save screen to clipboard objShell.SendKeys "{ESC}" ' Hit the Escape button Call Nap(iSeconds) strCnvtImage = strPathToConv + " /clippaste /resample=(1000,800) /convert=" + strimage + ".png" Set objWSHShell = CreateObject("WScript.Shell") objWSHShell.Run strCnvtImage, 0, True ' runing Irfan executable for converting the image ' Call ShellAndWait (strCnvtImage, False) ' runing Irfan executable SetGViewNumber(mcVIEW_TOP) ' Top View... RepaintScreen(True) Call RunMastercamCommand("OnScreenFit") RepaintScreen(True) ClearMenuAndPrompts Call Nap(iSeconds) Call RepaintScreen(True) Call RunMastercamCommand("ToClipboard") objShell.SendKeys "{ESC}" Call Nap(iSeconds) strCnvtImage = strPathToConv + " /clippaste /resample=(1000,800) /convert=" + strimage1 + ".png" Set objWSHShell = CreateObject("WScript.Shell") objWSHShell.Run strCnvtImage, 0, True ' Call ShellAndWait (strCnvtImage, False)' runing Irfan executable SetGViewNumber(mcVIEW_FRONT) Call RepaintScreen(True) Call RunMastercamCommand("OnScreenFit") Call Nap(iSeconds) Call RepaintScreen(True) ClearMenuAndPrompts Call RunMastercamCommand("ToClipboard") objShell.SendKeys "{ESC}" Call Nap(iSeconds) strCnvtImage = strPathToConv + " /clippaste /resample=(1000,800) /convert=" + strimage2 + ".png" Set objWSHShell = CreateObject("WScript.Shell") objWSHShell.Run strCnvtImage, 0, True 'Call ShellAndWait (strCnvtImage, False)' runing Irfan executable Call SetBackGroundColor(mcCOLOR_BLACK) SetGViewNumber(mcVIEW_ISO) Call RepaintScreen(True) Set objShell = Nothing Set objFSO = Nothing Set objWSHShell = Nothing End Function '/////////////////////// '// FUNCTION '/////////////////////// function Nap(iSeconds) Const DEF_LOCALHOST_IP = "www.microsoft.com" Dim objShell, pingstring ' Create a Shell object Set objShell = CreateObject("Wscript.Shell") pingstring = "ping -n 1 -w " & iSeconds & " " & DEF_LOCALHOST_IP objShell.Run pingstring, 0, True Set objShell = Nothing End function

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...