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:

Bullines

Verified Members
  • Posts

    3,094
  • Joined

  • Last visited

Everything posted by Bullines

  1. In my experience, the USB-to-Serial adapters are flaky. These tend to work more reliably.
  2. PRT SCR or ALT+PRT SCR...paste in the application of your choice (Ex: Paint, Word, etc).
  3. quote: I notice when running (without any files open) MC v9.1 in the Task Manager it shows 99-100% CPU usage.????????????. Old news. Fire up a Windows dialog from V9, like the Operations Manager, and watch the CPU usage drop. Close the Operations Manager and watch it shoot back to 100%. That's the way it is in V9 and earlier. quote: I have played with mine and now it always stays pegged around 50% now matter if I am processing a program or just letting it sit idle. Probably 2 50%'s, eh? Dual-core and HyperThreading CPUs should report 50% * 2, which is obviously 100%
  4. You're using the command-line version of 7-Zip, right?
  5. You bet. Make sure you're logged in with Admin rights on that computer. Go Start | Run, type "gpedit.msc" (no quotes) and hit ENTER to launch the Group Policy editor. In the left pane, expand "User Configuration" and then "Windows Settings". Click on "Scripts (Logon/Logoff)" and then double-click on "Logoff" in the right pane. Using the "Add" button on the resulting Logoff dialog, you can add any batch file that you want. HTH
  6. Here ya go. It prompts you for a CSV file and then sets the level names accordingly. code: Const DEF_FSO_FORREADING = 1 Const DEF_UNNAMED_LVL = """"""".""""""" ' Kick off our script Call Main() ' Purpose: The main subroutine Sub Main() Dim objFSO Dim objTS Dim strCSVPath Dim strInLine Dim arrTokLine ' Prompt the user for a CSV file. Bail if the user cancels ' the dialog. If Not (AskForFileName("*.CSV", "r", strCSVPath)) Then ShowString("No file selected. Aborting.") Exit Sub End If Set objFSO = CreateObject("Scripting.FileSystemObject") ' Make sure the file is actually there and bail if it isn't. If Not (objFSO.FileExists(strCSVPath)) Then objFSO = Nothing ShowString("File not found!" & vbLf & vbLf & strCSVPath) Exit Sub End If Set objTS = objFSO.OpenTextFile(strCSVPath, DEF_FSO_FORREADING, False) ' Read the CSV file line by line. For each line, make sure that it ' contains a comma. If it does, tokenize on the comma into an array. ' The first element is the level number and the second element is ' the level name. Set the named levels based on what's in the array. Do While(objTS.AtEndOfStream <> True) strInLine = Trim(objTS.ReadLine) If (InStr(1, strInLine, ",")) Then arrTokLine = Split(strInLine, ",") If Not (arrTokLine(1) = DEF_UNNAMED_LVL) Then Call SetLevelName(arrTokLine(0), Trim(arrTokLine(1))) End If End If Loop ' Close the CSV file. We're done with it. objTS.Close ' Cleanup Set objFSO = Nothing Set objTS = Nothing ' All done! ShowString ("All done!") End Sub HTH
  7. Oh, those "." were just meant as a "and so on and so forth" for me?
  8. Is that a tab between the number and level name or is it a space. A comma would be better. And if there's a ".", ignore that level, right?
  9. You bet. What does your CSV look like? Something like this...? 1,the_best_level 2,a_pretty_good_level 3,average_level 4,sucky_level 5,run_away_level
  10. quote: I want to conver files from mastercam to pdf You could use PDFCreator. Print to it like you would a normal printer and it'll create a PDF.
  11. quote: When you gonna make us an eMastercam Skin Bullines??? When I get some artistic ability
  12. quote: Not sure if you were asking me or Slick but mine has always been disabled. Slick, actually. But that's ok If you have bad sound, it might be streaming issues if listening online. Wonky soundcard driver if you're listening offline - could also be an overtaxxed system if you have onboard sound. quote: I'm a Winamp Guy. quote: I'm with James, winamp all the way Winamp is mint. I have an iPod and I still exclusively use Winamp; I don't even have iTunes installed...get that iTunes crap outta here! When it comes to a full-featured media player that doesn't suck all the resources out of your computer, Winamp saves the day. My take on it
  13. How about also setting tl.op.comment to the tool # as well?
  14. I'm assuming WMP 10. If you disable visualizations, does it help?
  15. Sounds like a copy and paste oopsie. Put that on two separate lines: code: Set objLine=Nothing Set objPoint=Nothing
  16. Try out this script. It'll prompt you for a Z depth and a level. The script will then go through all of the entites and move all entities at the depth that you entered to the level that you entered: code: '/////////////////////////////////////////////////////////////////////////////// '// '// Author: Chris Bellini [email protected] '// Copyright © 2006 In-House Solutions Inc. '// Date: 01/26/2006 1:44 PM '// File Name: webemachining2.vbs '// Description: Prompts the user to enter Z depth and level values. Then scans '// the database of the current MC9 for entities at the matching Z '// depth. Those matching entities are moved to the user-selected '// Level. '// '// http://www.emastercam.com/ubb/ultimatebb.p...ic;f=1;t=019012 '// '// Comments: '// - 01/26/2006 <cvb>: initial version '// '// '// ---------------------------------------------------------------------------- '// This library is free software; you can redistribute it and/or '// modify it under the terms of the GNU Lesser General Public '// License as published by the Free Software Foundation; either '// version 2.1 of the License, or (at your option) any later version. '// '// This library is distributed in the hope that it will be useful, '// but WITHOUT ANY WARRANTY; without even the implied warranty of '// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU '// Lesser General Public License for more details. '// '// You should have received a copy of the GNU Lesser General Public '// License along with this library; if not, write to the Free Software '// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, '// MA 02110-1301, USA '/////////////////////////////////////////////////////////////////////////////// ' Kick off the script. Call Main() ' Purpose: The main subroutine Sub Main() Dim objArc, objLine, objPoint, objRectangle ' entity objects Dim dTargetDepth ' depth to look for Dim iTargetLevel ' level to move entities to Dim iCurrEnt ' entptr of current entity Dim bMove ' move to the new level? Dim iMoveCount : iMoveCount = 0 ' number of entities we moved Dim bSuccf ' success flag ' Make sure there is a file open with geometry in it. If Not (IsDrawing()) Then ShowString "File is empty. Aborting." Exit Sub End If ' Promt user for depth to look for. If Not (askValue("Depth: ", -100.0, 100.0, dTargetDepth)) Then ShowString ("Script aborted") Exit Sub End If ' Prompt user for level to move matching entities to. If Not (askNumber("Level to move to: ", 1, 255, iTargetLevel)) Then ShowString ("Script aborted") Exit Sub End If ' Start searching the database bSuccf = StartDBSearch(mc_alive, mc_arctype Or mc_pointtype Or mc_linetype Or mc_recttype) ' Loop through the database of entities and retrieve the depth of each entity. If it's ' the same as the depth value that the user entered, set a flag to move the entity ' to the user-selected level. Do While bSuccf ' Get the current entity pointer iCurrEnt = GetEntityEptr() ' Initialize the move flag to FALSE bMove = False ' Get the depth of the current entity. If it has the same depth as the one that ' the user entered, set the move flag to TRUE. Select Case GetEntityType Case mc_arctype Set objArc = New McAr If GetArcData(iCurrEnt, objArc) Then If (objArc.Z = dTargetDepth) Then bMove = True End If Case mc_linetype Set objLine = New McLn If GetLineData(iCurrEnt, objLine) Then ' Move lines with endpoints at the same depth. If (objLine.Z1 = dTargetDepth) And (objLine.Z2 = dTargetDepth) Then bMove = True End If Case mc_pointtype Set objPoint = New McPt If GetPointData(iCurrEnt, objPoint) Then If (objPoint.Z = dTargetDepth) Then bMove = True End If Case mc_recttype Set objRectangle = New McRe If GetRectangleData(iCurrEnt, objRectangle) Then If (objRectangle.Z = dTargetDepth) Then bMove = True End If End Select ' If the move flag is set, move the entity to the chosen level. If (bMove) Then SetEntityLevel(iTargetLevel) iMoveCount = iMoveCount + 1 End If ' Get the next entity bSuccf = NextDBSearch() Loop ' Cleanup Set objArc = Nothing Set objLine = Nothing Set objPoint = Nothing Set objRectangle = Nothing ' All done! ShowString iMoveCount & " entites at Z=" & dTargetDepth &_ " have been move to Level " & iTargetLevel & "." End Sub ' Purpose: Determine if there is valid geometry on the screen. ' I: (None) ' O: True=valid geo, False=invalid geo Function IsDrawing() Dim bRet bRet = StartDBSearch(mc_alive, -1) IsDrawing = bRet End Function HTH
  17. No problem. If you want no user intervention at all, you can always store the directory path(s) in a file (like an INI file) or the Windows Registry that the script could read when it starts.
  18. quote: I've noticed that the AskString prompt leaves a space in the prompt window that you have to backspace to delete. If you don't then it can't find the path. I've noticed that too. You can get around that by using VBScript's Trim() function to get rid of any leading or trailing whitespace: code: Dim strName strName = Trim(AskString("What's your name?")) Even if you're not prompting for a directory, Trim() is still useful in those cases where the user accidentally hit the spacebar or whatever. quote: Is there any way to allow the user to chose a destination folder without having to type a name in? You can use the folder browser dialog of the Application class in the WSH. Here's a function that you can use in your scripts: code: ' Purpose: Prompt the user to select a directory and retrieve the selected path ' I: prompt to give the user on the directory selection dialog ' I: directory to start looking in ' O: string containing the directory selected (vbNullString if there's an error) Function FolderBrowser(strPrompt, strStartFolder) Const DEF_WINDOW_HANDLE = 0 Const DEF_NO_OPTIONS = 0 Dim objShell ' Shell Application object Dim objFolder ' Folder object Dim objFolderItem ' FolderItem object On Error Resume Next ' Create Shell Application, Folder and FolderItem objects Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.BrowseForFolder(DEF_WINDOW_HANDLE, strPrompt, DEF_NO_OPTIONS, strStartFolder) Set objFolderItem = objFolder.Self ' Return a null string if there was an error If Err.Number <> 0 Then FolderBrowser = vbNullString Err.Clear Exit Function End If ' Return the selected directory FolderBrowser = objFolderItem.Path ' Cleanup Set objShell = Nothing Set objFolder = Nothing Set objFolderItem = Nothing End Function You can use it like this: code: Dim strDir ' path to the selected directory strDir = FolderBrowser("Choose your cool directory.", "") If (strDir = vbNullString) Then ' The user bailed on selecting a directory. ' Handle this any way you want. End If Or you can automatically start in a given folder...say the Program Files directory: code: Dim strDir ' path to the selected directory strDir = FolderBrowser("Choose your cool directory.", "C:Program Files") If (strDir = vbNullString) Then ' The user bailed on selecting a directory. ' Handle this any way you want. End If HTH
  19. That should do the trick. For the utmost stability, you'd probably want to swap that GeForce 6800 for a Quadro FX 1400, but you should be ok.
  20. The Tool ID can be retrieved from functions like DefineNewTool(), GetMillToolPtr() and GetDrillToolPtr(). For example, if you have a tool in your library that you want to use: code: Dim strToolLib ' filename of your tool library Dim iToolID ' ID of a tool in your library ' Assemble the path to your tool library in the Mcam9 folder. strToolLib = GetPathFromExtension("TL9") & "my_tools.tl9" ' I'm assuming there's a matching tool in your library. iToolID = GetMillToolPtr(strToolLib, 0.25, 0.125, 10, mctool_flat) ' If the tool is in the library, make the contour op. If Not (iToolID = mcENTITY_INVALID) Then ' Do some stuff. Call MakeContourWithKnownTool("yay", iToolID, CUTTER_COMP_OFF, CUTTER_ROLL_NONE, 0) ' Do some more stuff. Else ShowString "Error - Can't find the tool in library: " & vbLf & vbLf & strToolLib End If HTH
  21. Talk to your Mastercam reseller. They'll be able to get the SDK for you.
  22. There's no way to use the mirror (among many others) functionality itself; only the one that uses the dialog via the RunMastercamCommand() sub. You'll have to manually mirror the entities yourself. It would look similar to this: code: Call Main() Sub Main() Dim iCurr ' entity pointer Dim bSuccf ' success flag Dim objLine ' McLn object Dim objArc ' McAr object Dim objPoint ' McPt object Dim iLvl ' level of the current entity Dim iColour ' colour of the current entity ' Start searching the database by getting the first entity. bSuccf = StartDBSearch(mc_alive, mc_arctype Or mc_pointtype Or mc_linetype) ' Loop through the database of entities and manually mirror and you see fit. Do While bSuccf ' Get the current entity pointer. iCurrEnt = GetEntityEptr() iLvl = GetEntityLevel() iColour = GetEntityColor() Select Case GetEntityType Case mc_linetype Set objLine = New McLn If GetLineData(iCurrEnt, objLine) Then ' Mirror line about the axis of your choosing. End If Case mc_arctype Set objArc = New McAr If GetArcData(iCurrEnt, objArc) Then ' Mirror arc about the axis of your choosing. End If Case mc_pointtype Set objPoint = New McPt If GetPointData(iCurrEnt, objPoint) Then ' Mirror point about the axis of your choosing. End If End Select ' Get the next entity. bSuccf = NextDBSearch() Loop End Sub Since you're looking for certain levels and colours, you'd want to put that SELECT inside of some logic, like an IF, to only do so when the current entity matches the colour and level that you want. quote: I also would like to have a "full" list of functions to use in Mastercam script. Since you're running V9, you're in luck. Take a look at McLangDef.csv in the root of your Mastercam directory (Ex: C:Mcam9McLangDef.csv). I've found more in there than in VBScript.htm. quote: The html that comes with the software is lacking functions that I have seen in some of the sample programs Tell me about it
  23. To add to what Rob posted, make sure you modify the NH_SERVER_ADDR variable in the [NH_TCPIP] section as there could be more than 1 instance of NH_SERVER_ADDR in a nethasp.ini file. Unless you are using a Novell network, in which case, you'd change it in the [NH_IPX] section. But I doubt you are.
  24. Like Dave said, the Quadro FX 540 would fall in that price range. If you have Level 3, Solids or just a lot of files with big ol' surfaces, you may want a bit more oomph. The Quadro FX 700 (I'm assuming you have AGP) isn't much more expensive and has a 256-bit interface to the card's memory.

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