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 Peterson

Moderators
  • Posts

    2,629
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Roger Peterson

  1. you have two problems. You are using rpar incorrectly is the first issue. The second issue is the parameters values in the documentation are not correct. my guess is they were not updated when the the toolpaths were consolidated a few versions back. Below are the values for the toolpaths I tested. I am unsure of of the "2D area" style toolpaths output. this has been reported but hopefully this helps. if prmcode$ = 12713, my_variable = rpar(sparameter$, 1) Dynamic set to stay inside = 0 Dynamic set to from outside = 0 Dynamic rest = 0 Dynamic contour = 2 Dynamic peel = 3 2d blend = 4 Any other toolpath = -99999
  2. 1. shut down mastercam 2. Delete the "MastercamSimulatorDefaults.xml" in the "my mcam2017" folder 3. Launch Mastercam and go, Mastercam creates a new .xml file when you launch Verify
  3. hmm, I'm not sure we are all on the same page, I'm explaining one thing, Ron another, and after re-reading what jlw posted I'm still not sure his question has been answered.... jlw can explain a little better what your looking for?
  4. Mastercam is looking into adding an option to create a point at the top of the hole, and a line above the hole. This functionality would be specifically for spot drilling and spot facing operations. No time frame that I am aware of. for now you can use this process: 1. use hole axis to create a point at the top of the hole 2. then use hole axis to create a line that extends above the hole 3. next use "Break at Points" to break all the lines at the points at the top of the hole. 4. use "All Result" or "All Group" to select entities you want to delete 5. finally delete the unwanted portion of the line it's a bit of work but I just worked on a part with ~686 holes and it only took a few minutes but the layout of the part made it pretty easy. HTH
  5. medial works well when it works. Geometry needs to be very clean and even then can have problems. Medial is easy to try, if it doesn't work, just create an "Engrave" toolpath. Using the Engrave toolpath pretty much always works but you do have the extra step of projecting the geometry flat. HTH
  6. I wish medial would work on two open chains. The fact that it requires a closed chain means I need to extend chains and then close of the ends. on simple geometry this isn't always necessary as you can just extend / trim the center line.
  7. c9k was commonly used to set the previous value of a variable, essentially forcing it out the next time the variable is encountered. We have had the "force" function for many years that is a much better way of handling this. for example both of these will essentially force the feedrate output the next time it is encountered in the post. prv_feed = c9k result = force(feed, feed) HTH
  8. there are a lot of workarounds that work in different scenarios but sooner or later you want a line above the hole and a point at the top of the hole (I usually create both the point and the arc at the top of the hole for spot facing purposes - see below) For example your suggestion of shifting the depth up a positive value works very well as long as all the holes have the same "length of engagement". Sometimes what hole axis creates needs to be adjusted, if I need to spot face a number of holes and some of the holes are at an acute angle to the model I may need slide the geometry graphically up and down along the tool axis, this really requires having a point, line, and arc at the top of the hole.
  9. Incorrect! Hole Axis does NOT do what he wants. (And what I want) He wants a point at the TOP of the hole which is easy. But he wants a line ABOVE the hole that terminates at the TOP of the hole. This would be useful for Spot Drilling and Spot Facing using drill 5 axis and circlemill 5 axis. Currently this is done in several steps: 1. use Hole Axis to create a point at the top of the hole 2. next use Hole Axis to create a line that extends above the hole 3. and finally trim the line to the point. (Break at points works well, but you still need to delete the part of each line you do not want to keep) That's the kicker you have to manually trim the line to each point, not a big deal for ten holes, but if you are doing 500, 1000, or more holes that's a lot of trimming.
  10. there is a script linker chook to do just this. I'm sure it's still available but I don't see it in 2017 in either the chooks directory or in the "all commands" when customizing.
  11. I believe the only HST toolpaths that currently do NOT support check surfaces are scallop, horizontal, and pencil. No doubt they all need it. But imo, Scallop is the one that really needs check surfaces first. Once Scallop does get check surfaces their are still many times they would NOT get used. Using a containment boundary to limit the cut area instead of check surfaces in many cases can results in much smoother motion at the toolpath edges, especially where vertical or near vertical walls are adjacent to the check surfaces. The good thing is we still have the "Classic" toolpaths whenever they are needed.
  12. the error states that fso hasn't been dimensioned. so, probably something like this: dim fso or: dim fso as filesystemobject I haven't done anything with vbs for many years. You could try posting on the masterca.com vb forum it may get more traffic? HTH
  13. not sure why the renaming wouldn't work but I didn't actually try running it, maybe send it in to Mastercam. But, if it's not working I would just post out as a dummy name then immediately rename file with the vbs code. I think it's a "FSO" function but I'm sure a quick search would turn something up. good luck!
  14. you would have to rename the nci via code before posting the second machine. or you could post the first one, rename the file, post the second one, rename the file, etc... When I originally set this up each machine posted to a separate folder so the filename wasn't an issue. I do not know of a way to ignore the warning message. from the help file: // Set the nci file name of the supplied id of the operation Bool SetNciNameFromOperationID ( Integer (Input: the operation ID number) String ( path and name to the nci file ) ) so you would need to set the nci for each op individually but the script is already checking each op to see if it selected so you could change it then. But, if you wanted to set them back to what they originally were you would need to keep track of the name in a string array.
  15. This is a very old vb script. I was browsing through the code and most of the logic is to ghost non-selected operations and then un-ghost them after posting has completed. This was due to the fact there was no "post selected operations" functionality, but only "post all operations" functionality. Because this was done many years ago you may want to check to see if there is a "post selected", it would make the vb script much simpler. good luck!
  16. thanks Mick, I have a couple of VERY old vb scripts still in use with older versions, good to know they can still be updated when the need arises.
  17. I guess what I meant is you need to know the operation ID you want to import before importing, vs. parsing the other file to determine what toolpaths and op id's it contains.
  18. Below is a very old script from V9 that would post selected operations to two post processors. There used to be a "runvbs.dll" chook to launch vb scripts but I don't see it in there so I'm not sure how to launch a vb script in 2017. '//////////////////////////////////////////////////////////////////////////////// '// '// Author: Roger Peterson '// Date: 10/15/04 '// File Name: post_selected.vbs '// '// Description: Post out all selected operation. Scan file to determine which operations are selected, '// ghost any operation not selected, post to selected post processors, un-ghost operations that were '// previously ghosted. Prompts the user to select the directory for the nc file and again for the '// directory for the doc file. Constant spost2 holds the path and name of the second post to be used. '// If you desire to use a .set file you must rename it so it has a .pst extension. '// '// Comments: Requires March Maintenance release '// '//////////////////////////////////////////////////////////////////////////////// ' -- Start Script Dim sprompt Call Main() ' //////////////////// ' Sub Declaration ' //////////////////// Sub Main() Dim posting(999) Dim selected(999) Dim intOpCount, idx, intCount Const spost2 = "c:\mcam9\mill\posts\mill2.pst" Const sdoc = ".doc" Const snc = ".nc" Const snci = ".nci" Const spst = ".pst" Dim spathnci Dim snamenci Dim spathnamenci Dim namepos Dim ncipos Dim sname Dim spathnc Dim strPath Dim spathdoc Dim contposting Dim spostoriginal Dim spost1 Dim spathpst '--resume the script on errors On Error Resume Next ' -- Determine how many operations are in the active file? intOpCount = GetOperationCount(vbNullString) ' -- If the file does not contain any operations, exit the script If intOpCount = 0 Then ShowString "No operations in the current mc9 file": Exit Sub ' -- Initialize intCount = 0 '------------------------------------------------------------------------------------ ' which and how many operations are selected '------------------------------------------------------------------------------------ For idx = 1 To intOpCount If GetOperationSelectedFromID(vbNullString, idx) Then selected(idx) = 1 intCount = intCount + 1 Else selected(idx) = 0 End If Next '------------------------------------------------------------------------------------ ' which and how many operations are NOT ghosted '------------------------------------------------------------------------------------ For idx = 1 To intOpCount If GetOperationPostingFromID(vbNullString, idx) Then posting(idx) = 1 Else posting(idx) = 0 End If Next '------------------------------------------------------------------------------------ ' -- If no operations are selected exit post '------------------------------------------------------------------------------------ If intCount = 0 Then ShowString "No operations are selected, You will be returned to Mastercam " Exit Sub 'Else ' ShowString intCount & " of " & intopcount & " operations are currently selected" End If '------------------------------------------------------------------------------------ ' -- Turn posting off on all ops not selected '------------------------------------------------------------------------------------ For idx = 1 To intOpCount If Not GetOperationSelectedFromID(vbNullString, idx) Then 'ShowString " operation # " & idx & " not selected" Call SetOperationPostingFromID(vbNullString, idx, True) End If Next '--------------------------------------------------------------------------------------------- 'Get NCI file name information '--------------------------------------------------------------------------------------------- spathnci = GetPathFromExtension("nci") spathnamenci = GetNciNameFromOperationID(vbNullString, 2) namepos = Len(spathnci)' Determine the length of the nci path - not included is the name of the nci file namepos = namepos + 1 ' Add one so \ is not included in the name snamenci = Mid(spathnamenci, namepos) ' snamenci includes just the name of the nci file and not the directory path ncipos = InStr(1, snamenci, snci, 1) ncipos = ncipos - 1 ' Subtract one so when removing the extension the . is also removed If ncipos Then sname = Left(snamenci, ncipos) ' This removes .nci from the name End If '--------------------------------------------------------------------------------------------- 'get post to be used so it can be reset at the end of script '--------------------------------------------------------------------------------------------- ' -- Get the currently set post processor spostoriginal = GetPostName spathpst = GetPathFromExtension("pst") spathpst = spathpst & spostoriginal & spst '--------------------------------------------------------------------------------------------- '-- Tell the user the post name, the name of the nci file, and how many operations have been selected '-- and ask if they would like to continue or go back and change the settings '--------------------------------------------------------------------------------------------- contposting = askYesNo("Postname: " & spostoriginal & " " & vbCrLf & "NC and DOC filenames: " & sname & vbCrLf & intCount & " of " & intopcount & " operations are currently selected" & vbCrLf & vbCrLf & "Select Yes To continue posting, No To return To Mastercam ") If contposting = 0 Then For idx = 1 To intOpCount Call SetOperationPostingFromID (vbNullString, idx, posting(idx)) Next Exit Sub End If '--------------------------------------------------------------------------------------------- 'get directories for nc and doc files '--------------------------------------------------------------------------------------------- ' -- Prompt user for a folder to post nc file------------------------------------------------- strpath = vbNullString sprompt = "Select folder for nc file:" While strPath = vbNullString ' -- Invalid path.... strPath = BrowseForFolder Wend strpath = AddBackSlash(strpath) spathnc = strpath ' -- Prompt user for a folder to post doc file------------------------------------------------ strpath = vbNullString sprompt = "Select folder for doc file:" While strPath = vbNullString ' -- Invalid path.... strPath = BrowseForFolder Wend strpath = AddBackSlash(strpath) spathdoc = strpath '--------------------------------------------------------------------------------------------- 'post .pst and .set files to their specified directories '--------------------------------------------------------------------------------------------- '---post to the current nci file name, using post #1------------------------------------------ Call RunPostAll(spathnc, True) '---post to the current nci file name, using post #2------------------------------------------ Call SetPostName(vbNullString) Call SetPostName(spost2) Call RunPostAll(spathdoc, True) '--------------------------------------------------------------------------------------------- ' -- Set posting (Operations ghosted) back To original settings '--------------------------------------------------------------------------------------------- For idx = 1 To intOpCount Call SetOperationPostingFromID (vbNullString, idx, posting(idx)) Next Call SetPostName(vbNullString) Call SetPostName(spathpst) Call SetPostName(vbNullString) Call SetPostName(spostoriginal) End Sub ' //////////////////// ' Function Declaration ' //////////////////// Function BrowseForFolder() On Error Resume Next Const WINDOW_HANDLE = 0 Const NO_OPTIONS = 0 Dim objShell, objFolder, objFolderItem Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.BrowseForFolder(WINDOW_HANDLE, sprompt, NO_OPTIONS, "Desktop") Set objFolderItem = objFolder.Self If Err.Number <> 0 Then BrowseForFolder = vbNullString Err.Clear Exit Function End If BrowseForFolder = objFolderItem.Path End Function ' //////////////////// ' Function Declaration ' //////////////////// Function AddBackSlash(sPath) If Right(sPath, 1) <> "\" Then sPath = sPath & "\" AddBackSlash = sPath End Function
  19. if you are doing a nethook I believe you can only access the database of the currently opened file. I believe with a chook it is possible to access the database of an external file.
  20. Couldn't agree more, I simply avoid it, not hard to for a thinwall part to curl up like a potato chip. But to be fair, conventional dynamic milling is still pretty mild compared to the old process' and for some people on some parts it probably has it's place.
  21. zig zag works great in aluminum as long as you have tooling and coolant that promote excellent chip evacuation as it will have a greater tendency to load up when conventional milling. Slowing down the conventional cuts a little can help, but in general I think the gains are minimal and not worth it unless the parts are long, like yours. I prefer to climb mill and adjust how I program instead. For example an L shaped pocket, try offsetting the wall geometry to make a smaller pocket just wide enough for your roughing tool to dynamic mill. Cut the smaller pocket first, then rest machine the larger original pocket. While not perfect, your tool will spend a lot more time in the cut. HTH
  22. Rickster, have you tried limiting the size of your undo file? It is in the configuration on the start/exit page. This should fix many of your issues. Limiting the size will limit the # of undo/redo you can do. I prefer to not limit my undo and occasionally reboot so I can have unlimited undo/redo. The undo file can become exceptionally large if you do a lot XFORM functions. HTH
  23. Clean and elegant solution. I see you are using deleted notes to store the string data, VERY NICE! I have a similar utility that is a standalone .exe launched at the time of posting, data is saved to an external .txt file (which is not ideal). This was necessary so it could be used with both standalone Mastercam as well as Mastercam for SolidWorks. This type of functionality is very necessary to many end users, hopefully this will be fully integrated someday. regards,
  24. Wait a minute, haven't we had this conversation before? Please, please, please bring wireframe toolpaths into MastercamforSolidWorks! Even just adding 2D swept and Ruled would be a huge benefit.
  25. I would take a look at the HST Project toolpath. You can have it do multiple depth cuts and trim to a stock model. the source for the cuts can be curves or a contour toolpath (any toolpath really). You won't have cutter comp but if your using the trim toolpath you won't have correct cutter comp output as well. if you have the multiaxis curve toolpath that makes it easy to trim cuts to a stock model as well. Works for 3, 4, or 5 axis machines. HTH

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