cncah

Verified Members
  • Content count

    37
  • Joined

  • Last visited

Community Reputation

2 Neutral

About cncah

  • Rank
    Member

Recent Profile Visitors

492 profile views
  1. In the Nethook API there is a property under OperationsManager called "JobSetupStockSize" The API says it returns a Point3D object. Might have a look at that.
  2. cncah

    Roundup Function?

    Thanks for the replies. The problem is not knowing which way to round. I appreciate the example on how to use a function Jeff. I will do something similar with a bunch of if statements to get the output I need.
  3. Is there a function to round UP a decimal to the nearest integer? I am in need of rounding numbers like 1.415 to 2, 3.46 to 4, etc. Any help with getting my G-Code more accurate would be greatly appreciated. Thanks.
  4. Thanks Jeff! Worked like a charm!
  5. How do add a quotation mark (inch mark) manually in the middle of a string? Any help would be much appreciated.
  6. I was going through the API help and was having a hard time finding the method for using Mastercam's "Merge" command. Does it exist in VB.Net?
  7. Amen to that! That's the method I use. We have anywhere from 1 to 200 configurations in a single model in Solidworks and using Mastercam for Solidworks has saved me countless hours!
  8. I've been looking in the API help and can't seem to find an API call for a Transform operation. Is there an interface in the NETHook API to tell if an operation is a transform op? If so, how can I tell if it has any operations selected? Any help would be appreciated. Thanks!
  9. Thanks for the reference Roger. I think that is close to what I'm looking for. I tried the RefreshOperationsManager command after setting the RefreshEnabled property to True, but it didn't work. I will research the API info to see if I can find a method that works. Thanks again for the help. I'll keep you posted as I'm able to find time to work on this project.
  10. I'm writing a loop that deletes certain operations if they meet certain criteria and I'm wondering if there is a refresh command that I need to do after the loop is finished? Currently after the loop is finished, the operation id numbers don't re-order themselves like they do if you delete an operation manually.
  11. Thanks Mick. I had thought about that but I figured that might cause extra processing time especially if there were a lot of 3D toolpaths. Here is what I ended up with: For i As Integer = 0 To UBound(ops) Dim op As Mastercam.Database.Operation = CType(ops(i), Mastercam.Database.Operation) If Not op Is Nothing Then If op.Type = 4 Then If op.Selected = False Then op.Selected = True op.Commit() op.Regenerate() End If Else If op.Selected = True Then op.Selected = False op.Commit() op.Regenerate() End If End If End If Next i I tried to only call the operation's change in selection if it was needed to keep the regenerate time to a minimum. Thanks again.
  12. Hello, I'm wondering if there is an API call that I'm missing when trying to unselect certain ops. I'm adding to a custom VB.Net Nethook. I'm looping through the list of operations and trying to unselect certain ones with this code: Dim ops As Array = Mastercam.Support.SearchManager.GetOperations().ToArray If ops.Length = 0 Then Exit Sub For i As Integer = 0 To UBound(ops) Dim op As Mastercam.Database.Operation = CType(ops(i), Mastercam.Database.Operation) If Not op Is Nothing Then If op.Type = 4 Then op.Selected = True Else op.Selected = False End If op.Commit() End If Next i Problem I'm running into is if I call op.Commit() then it marks the ops I want to unselect dirty. If I leave the op.Commit() code out then the code doesn't do anything. Am I missing something?
  13. Thanks Roger! I didn't have the current NetHook API help. Thanks for the link!

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