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. Ok, FileSystemObject does support UNC paths just fine. I wrote this to test: code: Const DEF_PATH = "REMOTECOMPUTERSome FolderChris" Const DEF_DPATH = "connormac" Const DEF_FNAME = "Test.txt" Const DEF_FSO_READ = 1 Call Main() Sub Main() Dim objFSO Dim objTS Dim objNewFolder Set objFSO = CreateObject("Scripting.FileSystemObject") ' Can we access UNC paths? If objFSO.FolderExists(DEF_PATH) Then ShowString "Yup, it's here" Else ShowString "Nope" End If ' Can we create new directories using UNC paths? Set objNewFolder = objFSO.CreateFolder(DEF_PATH & "" & DEF_DPATH) If (objNewFolder Is Nothing) Then ShowString "We can create that directory here" ' Can we read files using UNC paths? Set objTS = objFSO.OpenTextFile(DEF_PATH & "" & DEF_FNAME, DEF_FSO_READ, False) Do While(objTS.AtEndOfStream <> True) strTempLine = Trim(objTS.ReadLine) ShowString "From the file: " & strTempLine Loop Set objFSO = Nothing Set objTS = Nothing ShowString "Done!" End Sub The next thing I'd ask is...do you have permission to create directories in that network location?
  2. I'm not sure if the FileSystemObject can use UNC paths. Let me get back to you on that. In the mean time, try mapping a drive to that network location instead.
  3. quote: I want the script to execute when I hit the hotkey. Me too
  4. quote: I know there was a reason that the V9 chooks don't work in X, but is there any way to mass convert them? V9 C-Hooks need to be recompiled with the new X SDK in order to work in X. And compiling is not the only thing that must be done as there have been changes in the X SDK from the previous versions. Therefore a lot of their code must also be updated/refactored. So...no
  5. What is your X build? If you do an ALT+V, you'll see it in brackets underneath the Mastercam X logo. Also, does it help if you force the client to use TCP and no broadcast? In the [NH_TCPIP] section of your X client's nethasp.ini file, set: code: [NH_COMMON] NH_TCPIP = Enabled [NH_TCPIP] NH_SERVER_ADDR = 10.10.230.111 ; whatever your NetHASP Server's IP is NH_TCPIP_METHOD = TCP ; force TCP/IP NH_USE_BROADCAST = Disabled ; explicitely disable broadcast
  6. Are you using a nethasp.INI file with V9? If so, try copying into the root of your X directory on the clients as well. This would be necessary if you've hard-coded the IP address of your server in there or have configured other NetHASP settings.
  7. So if you click the "Read" button, none of your licensed products appear? Can you run Mastercam locally on the NetHASP server?
  8. Do you have the client workstation set to run in NetHASP mode? Go Start | Mastercam 9.1 | Nhasp9 Utility. Make sure that SIM Type is set to "NetHASP" and Mode is set to "Network". Better?
  9. Can you ping the NetHASP server computer from the client workstation that doesn't work?
  10. That is strange. But I'm sure I've read something similar before, since I do recall writing a VBScript a while back to unmap the drives for a forum member using V9. I can't find the forum thread but I do still have the script that I wrote back in March on my notebook: code: '//////////////////////////////////////////////////////////////////////////////// '// '// Author: Chris Bellini [email protected] '// Date: 03/03/2005 1:18 PM '// File Name: FixWeirdMcamMapping.vbs '// '// Description: Unmaps additional drives that Mastercam maps (for whatever '// reason) based on a list of allowable drives '// '// Comments: Modify the DEF_ALLOWED_DRIVES constant with mapped drive '// letters that are expected. '// '//////////////////////////////////////////////////////////////////////////////// Const DEF_ALLOWED_DRIVES = "Y:,Z:" ' follow this format ' call the main subroutine Call Main() ' Purpose: The main subroutine Sub Main() Dim objNetwork ' WSH Network object Dim objDrives ' Drives object Dim strCurrMapDrive ' drive letter of a mapped drive Dim arrAllowedDrives ' array containing allowable mapped drive letters Dim iEnumIdx ' outter FOR LOOP index Dim iAllowedIdx ' innner FOR LOOP counter Dim bAllowedDrive ' allowed drive flag ' Create a WSH Network object Set objNetwork = CreateObject("WScript.Network") ' Enumerate the mapped drives Set objDrives = objNetwork.EnumNetworkDrives ' Prepare our array of allowable drives arrAllowedDrives = Split(DEF_ALLOWED_DRIVES, ",") ' Check each enumerated network drive to see if it's a good one ' or one that Mastercam mysteriously created. If Mastercam mapped it, ' unmap the drive. We must increment the outter loop by 2 because the ' Item method returns a drive letter, then the network path and so on... For iEnumIdx = 0 to objDrives.Count - 1 Step 2 ' Init allowed drive flag bAllowedDrive = False ' Retrieve the drive letter of the mapped drive strCurrMapDrive = objDrives.Item(iEnumIdx) ' Test to see if the map drives is an allowed one For iAllowedIdx = 0 To UBound(arrAllowedDrives) If (strCurrMapDrive = arrAllowedDrives(iAllowedIdxy)) Then bAllowedDrive = True Exit For End If Next ' If the mapped drive isn't allowed, unmap it If (bAllowedDrive = False) And (strCurrMapDrive <> vbNullString) Then objNetwork.RemoveNetworkDrive (strCurrMapDrive) End If Next ' cleanup Set objNetwork = Nothing Set objDrives = Nothing ' all done ShowString "Extraneous network drives created by Mastercam have been unmapped." End Sub This script will unmap all network drives that you don't want. You inform it which drives you want to be mapped. So for example, if your Y and Z drives are network drives that should be mapped, modify this line like this: code: Const DEF_ALLOWED_DRIVES = "Y:,Z:" ' follow this format Save it and run the script. It should unmap all network drives that aren't Y or Z. As to why this even happens in the first place, I'm not sure. Are those Mastercam-created network drives browsable? If so, what are their contents? HTH
  11. Are you able to run scripts? Or is it just the VBS Editor that crashes?
  12. What is the date/time on your mcamvb.dll?
  13. Onboard video is for low-end home PCs. If your computer is a CAD/CAM workstation, get a CAD/CAM card.
  14. Did you install the HTML setup sheet from an account with Administrative rights on the local computer?
  15. quote: Bullines, any issues with .net framework 2 beta and Mastercam X getting along? Just looking ahead to Visual Studio 2005. Not sure and I don't plan on trying until I see that the 2.0 redistributable is shipping on Mastercam CDs There are a lot of kewl additions to .NET 2.0 but nothing from 1.1 has been removed AFAIK...just depreciated.
  16. quote: Joe, I use Nvidia now...a quadro NVS 280 to be exact. I am running V9 though and am afraid that I will have troubles in "X". The NVS line is aimed at business apps like PowerPoint and Excel, and isn't great for CAD/CAM apps. That's what the Quadro FX line is for; CAD, CAM and DCC.
  17. You said that your NetHASP server is rebooted 4 or 5 times a day? Does the server lose network connectivity or does the NetHASP Server software crash. Also, do you know if the NetHASP server was installed as an application or as a service?
  18. I'd look into whether or not you have permission to create files/directories in the NC directory.
  19. Does it run? Do you get any error messages?
  20. VBScript in a Nutshell and the VBScript Programmer's Reference might be good places to start to get yourself familiarized with the syntax. For documentation that's specific to automating Mastercam with VBScript, take a look at Mcam9HelpVBSCRIPT.HTM (McamxHelpVBSCRIPT.HTM if you're using X). You could also search this forum for terms like "VBS", "script", "vbscript" and "vb script"; you'll find a lot of user-submitted code.
  21. VBScript is a scripting language developed by Microsoft. Anyone is able to use this scripting language to automate many tasks in Mastercam such as geometry creation and toolpath generation. VBScript is a scripting language in that it is interpreted and not compiled (like C/C++). Therefore, to write VBScripts for Mastercam, all you need is Mastercam (obviously), a text editor (Ex: Notepad, CIMCO Edit, Mastercam Editor, etc.) and knowledge of VBScript (or Visual Basic or Visual Basic for Applications). Good start?
  22. Do you receive an error message?
  23. Bullines

    Jobs

    Workopolis, like ARP mentioned, and Monster are probably the two most popular job sites in Canada. HRSDC, a federal government site, also has a job bank.
  24. quote: I found that when in graphics erea if you kit (NOT hold down) ALT it underlines the top selection menus. From there you can run MCX like V9 with keystrokes. If you hit the Alt key it turns the underline off, Alt again its back on. AKA: standard Windows functionality
  25. PCIe cards yield better performance than AGP cards. The question comes down to whether your computer support PCIe (newer) or AGP (older). Note that PCIe is not the same is PCI.

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