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:

Roger Martin from CNC Software

CNC Software
  • Posts

    2,870
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Roger Martin from CNC Software

  1. There appears to be a defect with the Mirror member method in the Geometry class. The Geometry.Mirror and Geometry.Rotate methods can take a lot of time if you have hundreds of entities. A faster way (that also works!) is to use the XForm methods in GeometryManipulationManager -> /// <summary> Mirror all geometry. </summary> /// /// <returns> Success / Failure status. </returns> private bool MirrorAll() { // The GeometryManipulationManager XForm methods work on the 'selected' geometry. Mastercam.IO.SelectionManager.SelectAllGeometry(); var line = new Line3D(new Point3D(0, 0, 0), new Point3D(1, 0, 0)); var view = SearchManager.GetSystemView(Mastercam.IO.Types.GraphicsViewType.Top); var result = Mastercam.GeometryUtility.GeometryManipulationManager.MirrorGeometry(line, view, false); if (result) { // If we need to manipulate these geometry items further (as NET-Hook Geometry objects), // we can retrieve the Result of the last XForm operation -> var xFormResultGeometry = Mastercam.Support.SearchManager.GetResultGeometry(); // Do something with this geometry? } return result; }
  2. Picking of Solid edges for use as Chains in an Operation is not currently supported. We've put it on the request list, but this is something that is long term. Certainly not in X9, and probably not until after Mastercam 2017.
  3. This level of interaction is not possible using VB. It may be with a custom (C++) C-Hook Add-On. I'd need more details (sample file) to verify that. SDK@mastercam.,com
  4. Alexi, Maybe just some confusion on my part in the wording of your request. It sounds as if you are not really "importing", you are creating Machine Group(s) by selecting a Machine Definition - correct? '//////////////////////////////////////////////////////////////////////////////// '// '// Author: CNC Software, INnc. '// Date: 22/09/2015 '// File Name: MillMachineGroup.vbs '// '// Description: Mastercam VB Script '// '// Comments: Creates Mill Machine Group(s) '// '//////////////////////////////////////////////////////////////////////////////// '///////////////// Constants ///////////////// Public Const PRODUCT_MILL = 0 Public Const PRODUCT_LATHE = 1 Public Const PRODUCT_WIRE = 2 Public Const PRODUCT_DESIGN = 3 Public Const PRODUCT_ROUTER = 5 Public Const CNC_MACHINES_FOLDER = "C:\Users\Public\Documents\shared mcamx9\CNC_MACHINES\" Public Const MACHINE = "ROUTER 5-AXIS HEAD-HEAD.RMD-9" ' -- Start Script Call Main() ' //////////////////// ' Sub Declaration ' //////////////////// Sub Main() Dim numMachines Dim index If askNumber("How many Machine Groups?", 1, 100, numMachines) Then For index = 1 To numMachines Step 1 ChangeMachineType(PRODUCT_ROUTER) SetActiveMachine(CNC_MACHINES_FOLDER + MACHINE) Next End If End Sub To be able to execute a VB Script via a toolbar icon and/or keystroke you need to "link" it using ScriptLinker -> http://www.mastercam.com/en-us/Support/Downloads/Mastercam Select the Masterversion: X8 or X9 Scroll down to the Add-Ons section. Download and install ScriptLinker. Read the included instructions on how to "link" a VB Script.
  5. What version of Mastercam? Setting (or removing) the "drill" Points in an operation can get a bit involved. Please contact at [email protected] (with you Customer Info.)
  6. Pts2Arcs ArcMultiEdit PrmDef VHelix ZSpiral Are all scheduled to be included in the std. install in the next major release.
  7. Pts2Arcs is not part of the std. install. You can download it here (Be sure to get the X8 version if you're running X8!) -> http://www.mastercam.com/en-us/Support/Downloads/Mastercam
  8. Going to need some details on this System.Reflection.MethodInvoke error. Any indications of which Method it's complaining about? Are you sure you have the exact same version of HighSpeedInterop.dll being used in each of these situations?
  9. The new EXE installer worked for me and the HSMAdvisor_HOOK.dll runs. If you have X9 installed, the .NET 4.0 frameworks should already be on the system, as it's a prerequisite for X9.
  10. A .TOOLDB files does not contain "entities" like the old style TOOL-6. It is a SQL (lite) db file. Also, being way back on X6 is probably going to be an issue, as there was not much exposed in the SDK at that time.
  11. I get the same - HSMAdvisor_For_MasterCAM_X9_v1.162_NET4.0.exe does nothing. The EXE file was "blocked' after downloading, but I took care of that. I'm running McAfee and I tried turning it off and then the running the EXE (also as Admin) and the result was the same -> A couple seconds of spinning icon and then nothing...
  12. Required software tools for building a C-Hook for use with Mastercam X9 1> The Mastercam C-Hook SDK for X9 2> Microsoft Visual Studio 2013 (you can use the Community edition of 2013) <= NOT the new 2015 edition. You'll need to make some changes to the Project settings for new include paths and .lib files referenced in the C-Hook SDK. And maybe other changes, depending on what this C-Hook does and if any of the functions it used have changed within Mastercam.
  13. Did you try tool_manager? tp_tool tool = *toolPtr; // "Convert" from a new style tool (TlToolMillPtr) data to old-style. tool_manager(&tool, mode, &d_ptr, &succf); And if that's not what you want, try this... #include "TlToolFunctions_CH.h" CreateNewToolWizard (FALSE, toolPtr); // toolPtr here is a TlToolMillPtr
  14. Select the machine, define the stock, select the VPlane and TPlane, select a chain(s), define a tool, define an operation, attach the tool to operation, generate the G-Code. “define the stock” => Cannot do this programmatically. (Other highlighted items) => I always suggest not doing this. This is much more involved to do and you end up with a “hard-coded” add-on. Every time you need to tweak something, you end up having to rebuild the add-on. If you reference an operation from an OPERATIONS library file, all you need to do 98% of the time is adjust the parameters and/or tool in that “template” operation. What you want to do is import the operation (which has the tool) and then have the add-on gather up the chains, programmatically (if possible) or by prompting the user to select them.
  15. The "Unblock" option (if the file is blocked) would be found by right-clicking on the DLL file, selecting Properties tab and in the lower-right you'd see an "Unblock" button. *Note that this unblock issue is is only for NET-Hooks, not C-Hooks. This .NET issue is not new and not really a Mastercam issue, but it will be addressed in the next major release. Google: "File Zone Identifier" for more information if you're interested. If you're getting "Invalid user application", a couple thing to look at -> * The DLL was not built for the version of Mastercam you're trying to run it on. * The DLL is dependent on other (usually DLL) files that could not be found and/or loaded.
  16. On the Misc. Values page of the operation parameters... I assume that the 'Automatically set to post values when posting' option is not checked. I would check the NCI data see see what's in there. When you post your operation, select the create and edit the NCI file. Search for the line that contains only "1011". The line below is your (10) Misc. Real values. Is there really a value other then "0" for the MR1 ?
  17. Rich, Something to try. Have you user navigate to the NET-Hook D:: using Windows Explorer Right click on the DLL file and see if there is an UnBLock option available on the Properties tab, If so, do the UnBlock, start/restart Mastercam and trying running the NET-Hook
  18. Nevio, It appears that your vb.net (NET-Hook) is calling a function via a call into (C++) C-Hook DLL Dim rv As Integer = CHookInterop.RunTurnProfile(0) That C-Hook would need to be recompiled for X9, using the C-Hook SDK for X9. *** Ignore the above, if I had read all of your post, I should have noticed that the "C-Hook" being referenced is the SilhouetteBoundary.DLL, which of course part of Mastercam. I will look into this more today, and I'll get back to you... -------- * Update * ------ Nevio, Try this... Change this -> Public Const CHookDLL As String = "SilhouetteBoundary.DLL" To this -> Public Const CHookDLL As String = "MCCAD.DLL"
  19. As you've noticed, this property is not in the tp_tool structure. You need to use the new-style Tool functionality to get/set any of the "new" properties. So you're create tools "on the fly" and adding them to the tool list of the current Machine Group?
  20. Try this -> "test ", *mr1$, pe If still "0", is this PST setting mr1$ anywhere? In which postblock is your "test" output line?
  21. I am running Windows 7 with all Microsoft Updates and no I've never heard of any update causing a NET-Hook issue. Zip2Go.DLL is a NET-Hook and FindOverlap.DLL is a C-Hook. Meaning the .NET Framework is involved with one and not the other, so... it would appear that something has gotten messed up in that area on these systems. Trying running the CD_Compare.DLL (in \chooks\CD_Compare folder) and if that does not run, that could confirm this assumption.

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