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. It always starts with a single simple “how do I…” question and then…! Would need it to do the following: 1) Import a parasolid model. Simple: Mastercam.IO.FileManager.Open(filename); 2) Organize the entities ( Might not be needed ) - Easy except for the surfaces, hence the above question I have a sample NET-Hook project that prompts the user to Window select entities and then it moves the Surfaces to “other” levels and optionally changes their color. 3) Load operations from default file Yes… 4) Add selected entities to Toolpaths *Depending on the type of the toolpath. Not all types can be done. 5) Regenerate and Post Yes…
  2. Karl, Not with a VB Script. You'd need to do it with a NET-Hook or C-Hook type add-on. ​What version of Mastercam ? After the user select the Surfaces to be moved/re-colored.... Does the user select the color and level(s)? Or...? Shoot me your email to SDK <at> mastercam <dot> com
  3. XForm translate and rotate -> can be done "silently" without displaying any UI. XForm roll -> probably not. I think the only way to via the std. UI, which you can display doing this -> post_FT_command ("Mastercam", "do_xform_roll");
  4. ref: \interfaces\GUI\CGui_CH.h // Mark ALL entities as "selected" set_clr_sel_bits(SELECT_BIT, 0, SELECT_BIT, 0, ALL_ENTITIES_MASK, TRUE); // Mark ALL entities as "unselected" set_clr_sel_bits(0, SELECT_BIT, 0, SELECT_BIT, ALL_ENTITIES_MASK, TRUE); You want to XForm translate or rotate or...?
  5. ifilip, Use the "other" constructor for the the EndMillSphericalTool( - that takes parameters here - ) The default (parameter-less) constructor for the tool types have an issue of not setting the tooltype properly. (The has recently been resolved for a future release)
  6. Each entity in the database has a timestamp data member called "time". __time32_t time; ///< Date entity was created in db Your C-Hook could scan thru the database and gather those up and then do "whatever" with that data.
  7. You're running NETHook2? ​What version of Mastercam are you running? I see that there is no way to tell the (modeless) Level Manager to "update your data display now" when it's up. Currently you need to close/re-open the Level Manager dialog to get it to refresh the display of the new state of the level data that's been changed "behind its back". I've logged a Defect for this issue in the NETHook API. *Please email me, as I'd like to help you out here -> SDK <at> mastercam <dot> com
  8. Could you be a bit more specific as to what you're trying to do? You can manipulate the level data with a NETHook and the Level Manager will display the "state" of the Level data. You don't really tell the Level Manager to... "update your data display now"
  9. Not with VB Script as there is no "WriteSTL" function. (You can write out MCX, DXF or IGES files using VB Script)
  10. First off, I myself do not know the details of any future plans on this. (Not really my area.) But since it would be just an "extra" user entered descriptor that Mastercam itself does not pay any attention to. (Kind of like a Level Set "name") I'd think that fact of them being "locked" would not rule out any possibility of something in the future.
  11. A C-Hook is a type of Add-On. NET-Hooks are another type. The are an add-on program that someone has created to interact with Mastercam, to do "what ever", usually to automate some multi-step process, etc. A C-Hook is written in C++ (with MFC) and require the proper version of Microsoft Visual Studio ($$$ Pro version or higher ) and an additional SDK available from Mastercam. A NET-Hook is written using a Microsoft .NET language( C#, VB, F#) and the version of Visual Studio is not nearly as strict. You can use VS-2010, 2012, or 2013 (which can "target" the of the .NET Framework v4) and it can even be the free "Express" version of Visual Studio. NO additional SDK (Software Development Kit) is needed for NET-Hooks, as the .NET API (NETHook3_0.DLL) is part of the Mastercam product install.
  12. A new Plane is created for those cases. Say I have a X7 file with an Origin of X1, Y2, Z3 set on system TOP. I load that file into X8 and I now have a TOP-1 with that origin. The primary (TOP, FRONT, BACK, BOTTOM, RIGHT SIDE, LEFT SIDE, ISO) Planes are system Reserved Planes Reserved = "locked" if you wish to think of it that way.
  13. Prashant, Please e-mail me -> SDK <at> mastercam <dot> com So I can get your address.
  14. Yes... He said he wanted to do it "by code" and tagged his post with VBScript, so that's what I answered. The script cannot do anything different as File-SaveAs does in regards to the IGES data being written out it's really just a convenience of not have to click SaveAs and scroll down thru the File Types to find *.IGES ? You could use ScriptLinker to be able to create a Toolbar Icon for the script and with one click you get an IGES file
  15. You can ignore the "Cannot find or open the PDB file" messages, as they are normal have have nothing to do the the "Application Error" messagebox. Is the Mastercam X6 Product (not SDK) really installed at C:\mcamx6 and not the usual location C:\Program Files (x86)\mcamx6 ? Can you run the Release built version of your CHook in X6? As long as the CHook project is 64-bit and built as DEBUG, all you really should have to do is the the Command and Working Directory (as you've done). If you have verified that the Working Directory is correct and you still get this Error. You can try this -> *It may not help, but is quick and easy to try. Move all of the .FT files from the mcamx6\CHooks folder somewhere else, so that Mastercam will not find any .FTs when it is starting up.
  16. A simple example script.... ' -- WriteIGES.vbs ' ' -- Writes out the current data to an IGES file. ' ' -- The IGES file will be written to the folder of the current MCX file ' -- Kick off the script -- Call Main ' /////////////// ' Sub Declaration ' /////////////// Sub Main() Dim objFSO ' -- File System Object Dim strFileMCX ' -- The current MCX file (full path) Dim strFileIGS ' -- The IGES output file (full path) Dim strOutputPath ' -- The output folder Dim strOutputFile ' -- The output filename Dim bResult ' -- Create an instance of a File System Object Set objFSO = CreateObject("Scripting.FileSystemObject") strFileMCX = GetCurrentFileName() 'ShowString("strFileMCX -> " + strFileMCX) ' -- DEBUG strOutputPath = objFSO.GetParentFolderName(strFileMCX) + "\" ' ShowString("strOutputPath -> " + strOutputPath) ' -- DEBUG strOutputFile = objFSO.GetBaseName(strFileMCX) 'ShowString("strOutputFile -> " + strOutputFile) ' -- DEBUG ' -- Assembly the output IGES file path strFileIGS = strOutputPath + strOutputFile + ".IGES" ' -- Export the current Mastercam database to a IGES file. ' Note that a "enter comment" prompt will be displayed allowing ' you to supply a comment to be placed in the IGES about to be written. bResult = WriteIGES(strFileIGS) If bResult Then ShowString("IGES written to -> " + vbCrLf + strFileIGS) Else ShowString("IGES write -> failed!") End If ' -- Clean up Set objFSO = Nothing End Sub
  17. X6 ?!? 32 or 64-bit? You'll have to email me with your address -> SDK <at> mastercam <dot> com
  18. CadCam3d5axis, Short answer = no. I was going to update all of the Add-Ons this week to make them available for download next week. If you shoot me your email address to -> sdk <at> mastercam <dot> com I'll get the the Arc MultiEdit for X8 to you ASAP.
  19. What version of Mastercam? (Not that may make any difference, but it's always good to know) Are you only interested in creating the NCI file? Or are you really wanting to go all the way to posted NC code? Do you really want to only process one op? Or are you needing to process all of the selected operations? Generating the NCI file data does not really require a PST. The PST comes into play going from NCI to NC As to why you seem to be seeing a difference the NCI being created, I don't know at this time. If you could ZIP up and send me your CHook project and some sample files. I'd be happy to investigate. SDK <at> mastercam <dot> com
  20. If you really want to remove this functionality, it can be done. The button will still be there, but if you click it nothing will happen. Disclaimer: You really should not be messing with this file. BACKUP IT UP before ever touching it! If you don't and have to re-install Mastercam, it's no one's fault but your own. And finally - I never told you about this. In the main mcamx7 folder you will find the Mastercam.ft file. Open it in a text editor... Find this -> FUNCTION CPP "OMregenDirtyOperations" HIDDEN END_FUNCTION And add the '#' characters shown -> #FUNCTION CPP "OMregenDirtyOperations" #HIDDEN #END_FUNCTION
  21. sir Camalot We certainly appreciate the thoughtful suggestions! One that I can comment on, because I know the answer for this one. -> In the upcoming X8, the [spacebar] is => ‘repeat last function’
  22. PRMDEF According to the PrmDef.PDF (included with the utility) the above should not be necessary. (This PDF should be in the CHooks and/or HELP folder just below the main Mastercam folder) I see this in the item #2 section in the PDF-> “You can also have PrmDef set the desired mode automatically when Mastercam starts up.” And reading on, it tells you how to do that.
  23. Get your tissues ready, because the END key spin no longer exists => X8.

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