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:

Mick from CNC Software Inc.

CNC Software
  • Posts

    1,012
  • Joined

  • Last visited

Everything posted by Mick from CNC Software Inc.

  1. To access a message box you can use the following: code: Dim WSH Set WSH = CreateObject("WScript.Shell") Call WSH.Popup("This is a popup box!", 10, "Title", 65) I don't know how to invoke an Inputbox I'm afraid.
  2. There does appear to be an issue with the MergeMC() VBScript function, we are looking into it and will respond to this thread as soon as we have more information.
  3. Josh_Petitt, I assume you want to queue up multiple NC files to send to the same CNC via the same port? Unfortunately our communications program does not support queuing files to send although it does support sending multiple files to multiple CNC's via unique ports but that doesn't address your needs I'm afraid.
  4. One rare occasions, the file toolbars.atb that stores the editors toolbar and menu layout can become corrupt. In any event deleting this file will reset the toolbar and menus back to their original state, close the editor delete the file restart the editor should rectify the problem.
  5. quote: Cimco for sure. CNC should not waist their time with and editor when cimco has such a good one. The Mastercam editors primary function is to assist a user when creating Mastercam VBScripts and to a lesser degree Mastercam Posts by utilizing built in intellisense, syntax highlighting and many other helpful editing options, it is *NOT* a communications program, it has absolutely zero ability to communicate to a CNC machine directly. The editors communications menu launches an external program that you set via the menu Tools-Options-Communications, CIMCO among other communication programs can be used if desired. As for the tip, I'll be sure to mention that at the next managers meeting.
  6. Ron, I was thinking (always a bad sign), what if I displayed a list of Machine Defs and you select the ones you want to use when posting? This way you are not by-passing a MD so to speak? I can set a MD at runtime just like a post, any ideas?
  7. This NETHook was created to help put some new enhanced NETHook API posting functionality in the upcoming X2 MR2 release through its paces. I am always looking for a 'real world' example or two to help test our API and like I said earlier, after following this thread a little it did seem like a suitable candidate. This NETHook is not an official CNC Software NETHook and as such there is no official support or anything official associated with it.
  8. After following this thread a little I went ahead and created a MultiPost NETHook. Before I go any further, this NETHook was developed under X2 MR2 Beta due to new NETHook API functionality and as such will not work with any official released versions of X2. If you are a beta tester and would like to test this NETHook please drop me an e-mail via these boards. Essentially the NETHook will display a selectable list of *.pst and *.set files, the list displayed is based upon the current Machine Type loaded. You will need to select an output folder to save your files too, a sub folder will be created from the selected post(s) and the NC/NCI files will be named with the current drawing name and placed in the folder. Note that any files in an existing sub folder will be purged prior to posting. You can add a toolbar button by selecting Settings-Customize menu, then from the Categories dropdown select NETHooks, find the Multipost button and drag it to a toolbar. The selected output folder and posts are retained from one session to another. Again, if you are a beta tester and would like to test this NETHook please drop me an e-mail via these boards.
  9. Matt, There are some great things in store for the NETHook SDK, stay tuned
  10. Matt, I went ahead and put an example together, not sure if this is what you are after but hopefully it will shed some more light on the nesting process. I created a VB.NET project that shows how to create a nestlist and nest on the fly. The example shows how to load the default nesting options, adjust some values, create a new nest file and execute it. The example was compiled and tested under X2 MR1 VB.NET 2005 Any quests feel free to post on this thread. **NOTE** There are two paths hard coded within the project, you will need to edit them to suit your PC paths, they are clearly marked in the source. VBNestingExample.zip
  11. Matt, I am a little confused as to what exactly you are trying to do, can you gives us a little more information, thanks.
  12. Rich, I uploaded an update that adds a Restart button to the dialog, let me know if you have any trouble.
  13. Denny, Not sure what that is, from Mastercam select Help, About, then click the details button on the dialog, copy and past the text here, thanks.
  14. Denny, sounds like you are not using X2 MR1? What version of X are you currently using?
  15. Roger, Check the checkbox 'Save bitmap to file' to enable it. There is a brief readme.txt included in the zip.
  16. Denny, one other thing, try and run the NETHook ,directly, press ALT+C to bring up the CHooks dialog, browse to the FileBrowse.DLL and select it, does it run?
  17. Denny, this NETHook was built with X2 MR1, what version of X are you using?
  18. quote: If the new utility will just open and save as an X2 file with a bitmap, that would be even better I just added that as an option when browsing, you can set a delay of zero and it will just blow right through the folder. To run it, go to Settings menu then Customize menu, from the Category dropdown select NETHooks, you will see some buttons, one is for this NETHook, hover your mouse cursor over each button to see the name of the NETHook, once you find the FileBrowse just darg it to a toolbar. You can now run the NETHook from that toolbar button. Denny, Paths look fine. I would download the update and copy both files to their appropriate folders and give it another try. Try making a toolbar button as described above and launch it from there.
  19. Check this thread as I created a NETHook that should do what you ask.
  20. Updated NETHook to include an option to save files as MCX with a bitmap to enable the file preview functionality.
  21. Denny, I have the NETHook in my "C:McamX2-MR2chooksFileBrowse" folder and the ft file in my "C:McamX2-MR2chooks" and it runs as expected, can you double check to make sure everything is as it should be with your installation.
  22. Forgive the old post bump but I didn't think this deserved a new thread. I updated the GetJobInformation.vbs script from a few years ago, I guess it was not X friendly and I only realized this when a customer sent me the script to fix. Below is the entire script for those who may want to use it, copy and paste into a new Mastercam VBScript and save it to your X VB folder. Broke the table too i'm afraid code: '//////////////////////////////////////////////////////////////////////////////// '// '// Author: Mick George [email protected] '// Date: 06/11/2003 09:52 AM '// File Name: GetJobInformation.vbs '// '// Description: Gets current job information and dumps it to an html file and '// then, lord willing, loads up IE and displays it. '// '// Comments: Only tested under IE may look like craaaap in anything else '// '// Revision: Updated 30/7/07 to run under X2 '// '//////////////////////////////////////////////////////////////////////////////// ' -- Start Script Call Main() ' //////////////////// ' Sub Declaration ' //////////////////// Sub Main() Dim strCurrentFileName, strReportName Dim strHTML, strOpComment Dim FSO, fsoReport Dim intOperations, intOpCount, strOperationName, ToolNumber, strToolComment Dim dblTemp Dim intOpTypeId ' -- Prompt for a report name strReportName = AskString("Input name of report", "Test Report") If Len(Trim(strReportName)) = 0 Then Exit Sub ' -- Check for EXT If Len(strReportName) <= 5 Then strReportName = strReportName & ".html" Else If Right(LCase(strReportName), 5) <> ".html" Then strReportName = strReportName & ".html" End If Call ClearPromptLines Call WriteString("Generating report, please wait....") Set FSO = CreateObject("Scripting.FileSystemObject") ' -- Get the file's name strCurrentFileName = GetCurrentFileName ' -- Make sure we are in ISO view Call SetGViewNumber(mcVIEW_ISO) ' -- Generate bitmap image of part Call DoBitmapfile(vbNullString, GetPath & "IMAGE.BMP") ' -- Store path to out report strHTML = GetPath & strReportName ' -- Create our html file Set fsoReport = FSO.CreateTextFile(strHTML) With fsoReport .WriteLine "<!DOCTYPE HTML PUBLIC " & Chr(34) & "-//W3C//DTD HTML 4.0 Transitional//EN " & Chr(34) & ">" .WriteLine "<HTML>" .WriteLine "<HEAD>" .WriteLine "<TITLE>Mastercam Job Setup Sheet</TITLE>" .WriteLine "</HEAD>" .WriteLine "<BODY BGCOLOR = " & Chr(34) & "white" & Chr(34) & "><BODY>" .WriteLine "<td width=" & Chr(34) & "287" & Chr(34) & "><a href=" & Chr(34) & "http://www.mastercam.com" & Chr(34) & "><img src=" & Chr(34) & "http://www.mastercam.com/images/hm_logo.gif" & Chr(34) & " width=" & Chr(34) & "287" & Chr(34) & " height=" & Chr(34) & "65" & Chr(34) & " border=" & Chr(34) & "0" & Chr(34) & " align=" & Chr(34) & "left" & Chr(34) & " alt=" & Chr(34) & "Mastercam.com" & Chr(34) & "></a>" .WriteLine "</table>" .WriteLine "<font color=" & Chr(34) & "#A72934" & Chr(34) & ">" .WriteLine "<MARQUEE id=Marquee3 style=" & Chr(34) & "WIDTH: 300px; HEIGHT: 13px" & Chr(34) & " trueSpeed scrollAmount=3 scrollDelay=3 behavior=slide Loop=1><SPAN Class=564313111-17052002>CNC Software, Inc</SPAN></MARQUEE><BR>" .WriteLine "<MARQUEE id=Marquee3 style=" & Chr(34) & "WIDTH: 300px; HEIGHT: 13px" & Chr(34) & " trueSpeed scrollAmount=2 scrollDelay=3 behavior=slide Loop=1><SPAN Class=564313111-17052002>671 Old Post Road</SPAN></MARQUEE><BR>" .WriteLine "<MARQUEE id=Marquee3 style=" & Chr(34) & "WIDTH: 300px; HEIGHT: 13px" & Chr(34) & " trueSpeed scrollAmount=1 scrollDelay=2 behavior=slide Loop=1><SPAN Class=564313111-17052002>Tolland, CT 06084</SPAN></MARQUEE><BR>" .WriteLine "</font>" .WriteLine "<BR><BR>" .WriteLine strCurrentFileName .WriteLine "<BR><BR>" .WriteLine "<td align = " & Chr(34) & "right" & Chr(34) & "><img src=" & Chr(34) & "IMAGE.BMP" & Chr(34) & " border=" & Chr(34) & "1" & Chr(34) & Chr(34) & " align=" & Chr(34) & "left" & Chr(34) & "></a></td>" .WriteLine "<table width = " & Chr(34) & "50%" & Chr(34) & " border=" & Chr(34) & "1" & Chr(34) & " cellspacing=" & Chr(34) & "1" & Chr(34) & " cellpadding=" & Chr(34) & "0" & Chr(34) & " bordercolorlight=" & Chr(34) & "#C0C0C0" & Chr(34) & " bordercolordark=" & Chr(34) & "#A72934" & Chr(34) & ">" .WriteLine "<tr>" .WriteLine "<td align = " & Chr(34) & "right" & Chr(34) & "><b>Material:</b></td>" .WriteLine "<td align = " & Chr(34) & "right" & Chr(34) & ">" & GetJobSetupMaterial & Chr(34) & "</td>" .WriteLine "</tr>" .WriteLine "<td align = " & Chr(34) & "right" & Chr(34) & "><b><u>Origin</u></b></td>" .WriteLine "<tr>" .WriteLine "<td align = " & Chr(34) & "right" & Chr(34) & "><b>X:</b></td>" .WriteLine "<td align = " & Chr(34) & "right" & Chr(34) & ">" & GetJobSetupStockOriginX & Chr(34) & "</td>" .WriteLine "</tr>" .WriteLine "<tr>" .WriteLine "<td align = " & Chr(34) & "right" & Chr(34) & "><b>Y:</b></td>" .WriteLine "<td align = " & Chr(34) & "right" & Chr(34) & ">" & GetJobSetupStockOriginY & Chr(34) & "</td>" .WriteLine "</tr>" .WriteLine "<tr>" .WriteLine "<td align = " & Chr(34) & "right" & Chr(34) & "><b>Z:</b></td>" .WriteLine "<td align = " & Chr(34) & "right" & Chr(34) & ">" & GetJobSetupStockOriginZ & Chr(34) & "</td>" .WriteLine "</tr>" .WriteLine "<tr>" .WriteLine "<td align = " & Chr(34) & "right" & Chr(34) & "><b><u>Size</u></b></td>" .WriteLine "</tr>" .WriteLine "<tr>" .WriteLine "<td align = " & Chr(34) & "right" & Chr(34) & "><b>X:</b></td>" .WriteLine "<td align = " & Chr(34) & "right" & Chr(34) & ">" & GetJobSetupStockSizeX & Chr(34) & "</td>" .WriteLine "</tr>" .WriteLine "<tr>" .WriteLine "<td align = " & Chr(34) & "right" & Chr(34) & "><b>Y:</b></td>" .WriteLine "<td align = " & Chr(34) & "right" & Chr(34) & ">" & GetJobSetupStockSizeY & Chr(34) & "</td>" .WriteLine "</tr>" .WriteLine "<tr>" .WriteLine "<td align = " & Chr(34) & "right" & Chr(34) & "><b>Z:</b></td>" .WriteLine "<td align = " & Chr(34) & "right" & Chr(34) & ">" & GetJobSetupStockSizeZ & Chr(34) & "</td>" .WriteLine "</tr>" .WriteLine "</table>" .WriteLine "<BR><BR><BR><BR><PRE>" .WriteLine "<BR></PRE>" .WriteLine "<table align = " & Chr(34) & "left" & Chr(34) & "width =" & Chr(34) & "85%" & Chr(34) & "border=" & Chr(34) & "1" & Chr(34) & "cellspacing=" & Chr(34) & "2" & Chr(34) & " cellpadding=" & Chr(34) & "2" & Chr(34) & " bordercolorlight=" & Chr(34) & "#C0C0C0" & Chr(34) & " bordercolordark=" & Chr(34) & "#A72934" & Chr(34) & ">" .WriteLine "<caption align=" & Chr(34) & "left" & Chr(34) & "><B>OPERATION TOOL LIST</B></caption>" .WriteLine "<th>OP#</th>" .WriteLine "<th>T#</th>" .WriteLine "<th>TO</th>" .WriteLine "<th>TLO</th>" .WriteLine "<th>TDIA</th>" .WriteLine "<th>TLEN</th>" .WriteLine "<th>MIN Z</th>" .WriteLine "<th>MAX Z</th>" .WriteLine "<th>OPERATION TYPE</th>" .WriteLine "<th>TOOL COMMENT</th>" .WriteLine "<th>OPERATION COMMENT</th>" ' -- Get current files operation count intOpCount = GetOperationCount(vbNullString) ' -- Iterate all operations For intOperations = 1 To intOpCount ' -- Get our tool number ToolNumber = GetToolNumberFromOperationID(vbNullString, intOperations) .WriteLine "<tr>" .WriteLine "<td align = " & Chr(34) & "center" & Chr(34) & ">" & intOperations & "</td>" .WriteLine "<td align = " & Chr(34) & "center" & Chr(34) & ">" & ToolNumber & "</td>" .WriteLine "<td align = " & Chr(34) & "center" & Chr(34) & ">" & GetToolDiameterOffsetNumber(ToolNumber) & "</td>" .WriteLine "<td align = " & Chr(34) & "center" & Chr(34) & ">" & GetToolLengthOffsetNumber(ToolNumber) & "</td>" .WriteLine "<td align = " & Chr(34) & "center" & Chr(34) & ">" & GetToolDiameter(ToolNumber) & "</td>" .WriteLine "<td align = " & Chr(34) & "center" & Chr(34) & ">" & GetToolLength(ToolNumber) & "</td>" .WriteLine "<td align = " & Chr(34) & "center" & Chr(34) & ">" & FormatValue(GetNciMinZFromOperationID(vbNullString, intOperations),4) & "</td>" .WriteLine "<td align = " & Chr(34) & "center" & Chr(34) & ">" & FormatValue(GetNciMaxZFromOperationID(vbNullString, intOperations), 4) & "</td>" ' -- Get this operations type intOpTypeId = GetOperationTypeFromID(vbNullString, intOperations) ' -- What type of operation is it? Select Case intOpTypeId Case mcOPERATION_CONTOUR: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">CONTOUR</td>" Case mcOPERATION_DRILL: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">DRILL</td>" Case mcOPERATION_POCKET: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">POCKET</td>" Case mcOPERATION_ROUTER_BLOCK_DRILL: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">BLOCK DRILL</td>" Case mcOPERATION_ROUTER_CNTR: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">ROUTER CONTOUR</td>" Case mcOPERATION_ROUTER_CUTOFF: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">ROUTER CUTOFF</td>" Case mcOPERATION_ROUTER_POCK: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">ROUTER POCKET</td>" Case mcOPERATION_SRF_RGH_PARALLEL: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">SURFACE ROUGH PARALLEL</td>" Case mcOPERATION_SRF_RGH_RADIAL: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">SURFACE ROUGH RADIAL</td>" Case mcOPERATION_SRF_RGH_PROJECT: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">SURFACE ROUGH PROJECT</td>" Case mcOPERATION_SRF_RGH_FLOWLINE: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">SURFACE ROUGH FLOWLINE</td>" Case mcOPERATION_SRF_RGH_CONTOUR: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">SURFACE ROUGH CONTOUR</td>" Case mcOPERATION_SRF_RGH_POCKET: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">SURFACE ROUGH POCKET</td>" Case mcOPERATION_SRF_FIN_PARALLEL: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">SURFACE FINISH PARALLEL</td>" Case mcOPERATION_SRF_FIN_RADIAL: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">SURFACE FINISH RADIAL</td>" Case mcOPERATION_SRF_FIN_PROJECT: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">SURFACE FINISH PROJECT</td>" Case mcOPERATION_SRF_FIN_FLOWLINE: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">SURFACE FINISH FLOWLINE</td>" Case mcOPERATION_SRF_FIN_CONTOUR: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">SURFACE FINISH CONTOUR</td>" Case mcOPERATION_SRF_FIN_PENCIL: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">SURFACE FINISH PENCIL TRACE</td>" Case mcOPERATION_SRF_FIN_LEFTOVER: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">SURFACE FINISH LEFTOVER STOCK</td>" Case mcOPERATION_SRF_FIN_STEEP: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">SURFACE FINISH STEEP</td>" Case mcOPERATION_SRF_FIN_SHALLOW: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">SURFACE FINISH SHALLOW</td>" Case mcOPERATION_SRF_FIN_CONSCALOP: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">SURFACE FINISH CONSTANT SCALOP</td>" Case mcOPERATION_SRF_RGH_PLUNGE: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">SURFACE ROUGH PLUNGE</td>" Case mcOPERATION_SRF_FLOW5AX: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">SURFACE FINISH 5AXIS FLOWLINE</td>" Case mcOPERATION_SRF_4AX: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">SURFACE FINISH 4 AXIS</td>" Case mcOPERATION_MERGED_NCI: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">MERGED IN ASCII NCI</td>" Case mcOPERATION_5AX_SWARF: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">5 AXIS SWARF</td>" Case mcOPERATION_5AX_ROLLDIE: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">5 AXIS ROLL DIE</td>" Case mcOPERATION_FACE: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">FACE OPERATION</td>" Case mcOPERATION_5AX_MSURF: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">5 AXIS MULTI SURFACE ROUGH</td>" Case Else: .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">*UNKNOWN OPId* -> " & intOpTypeId & "</td>" End Select strToolComment = GetToolComment(ToolNumber) If Len(Trim(strToolComment)) = 0 Then .WriteLine "<td> -//- </td>" Else .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">" & strToolComment & "</td>" End If strOpComment = GetOperationNameFromID(vbNullString, intOperations) If Len(Trim(strOpComment)) = 0 Then .WriteLine "<td> -//- </td>" Else .WriteLine "<td align = " & Chr(34) & "left" & Chr(34) & ">" & strOpComment & "</td>" End If .WriteLine "</tr>" Next .WriteLine "</FONT>" .WriteLine "</BODY>" .WriteLine "</HTML>" .Close End With Call RepaintScreen(True) Call ClearPromptLines Call WriteString("Launching report, please wait....") Call ShowMe(strHTML) Call ClearPromptLines End Sub ' //////////////////// ' Function Declaration ' //////////////////// Public Function ShowMe(sHTML) On Error Resume Next Dim objIE ' Create the IE object and sets some parameters Set objIE = CreateObject("InternetExplorer.Application") If objIE Is Nothing Then Exit Function If Err Then ShowString "Error loading Internet Explorer " & Err.Description Exit Function End If With objIE .Navigate sHTML .ToolBar = True .StatusBar = False .Resizable = True Do ' -- Zzzzzz.... Loop While .Busy .Visible = True End With Set objIE = Nothing End Function
  23. tryon, The find and replace dialog is part of a third party control we license that also controls all of the syntax highlighting, intellisense functionality and more. After looking through the source I do not see a way of keeping the dialogs modal. Lee, MR2 is currently in the beta testing but I'm afraid I do not have any release date information at this time.

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...