SavannahG
-
Posts
9 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Store
eMastercam Wiki
Blogs
Gallery
Events
Posts posted by SavannahG
-
-
Jeff, do you have an example of how to save the tool to the tool manager using the ToolNetApi.dll functions? I have the method for the Mastercam.database EndMillFlatTool class as follows:
Friend Function CreateEMFlat(P As Integer) As EndMillFlatTool
' Define a new tool
Dim endMill = New EndMillFlatTool(ToolDia(P), ToolRad(P), ToolNum(P), ToolLenOff(P), ToolDiaOff(P), oa_len(P), flute_len(P), shldr_len(P), ToolCmnt(P)) With {
.Coolant = CoolantMode.COOL_FLOOD,
.Flutes = ToolFlts(P),
.MfgToolCode = ToolMfg(P),
.PlungeFeed = ToolPlunge(P),
.RetractFeed = ToolRetract(P)}MessageBox.Show("Neck Relief = " & ToolRel(P))
' Commit the tool to the database
Return If(Not endMill.Commit(), Nothing, endMill)End Function
**************************************************************
I've been trying to figure out how to commit the tool using the ToolNetAPI TlToolEndmill class.
Friend Function CreateEMF(P As Integer) As TlToolEndmill
' Define a new tool
Dim endMill = New TlToolEndmill() With {
.OverallDiameter = ToolDia(P),
.MfgToolCode = ToolMfg(P),
.OverallLength = oa_len(P),
.ShoulderDiameter = shldr_len(P),
.ShoulderLength = shldr_len(P),
.NeckDiameter = ToolRel(P),
.Name = ToolName(P)}Return ???
End Function
-
Thank you Peter. This looks like what I need.
-
Thank you for the suggestions.
Peter, I'm trying to define a end mill with a relief diameter, so it goes cutter diameter/length, then shoulder diameter/length, then Neck diameter/length, then Shank diameter to Overall length.
Jeff, I'm going by the Net-Hook API reference guide online version of the NET-Hook_v3 Reference. That was what I found in the MasterCam downloads. I'll look into the ToolNetApi. It looks promising. -
I've searched and searched and I can not find a property in the Net-Hook API to define the reduced neck diameter and length for an end mill. There's flute, shank, and shoulder, but no reduced neck, Is this missing, or am I missing something?
-
Added this to turn on notification.
-
I'm resurrecting this post because I would like to know if access to the holder definition, and the ability to create an tool and holder assembly, has been added to the VB NETHook API? I'm trying to build a tool library from our Excel inventory list and need to create tool and holder assemblies for the dedicated tools loaded in our 5-axis. Thank you.
-
On 6/28/2017 at 9:28 AM, nickbe10 said:
I originally programmed in APT, organizing your geometry file in some sort of usable and logical order was essential. So with 999,999 levels it was a natural and easy transfer for me. Each OP starts on a number separated by 100 or 1000 depending on the size of the file. I always put a copy of the origin on the first level, say 100. Op2 would be 200. All Op1 Toolpath geometry 120 - 130, Op2 220 - 230.....you get the idea. 0 - 100 for models and setup geometry etc...things that all the ops might refer to. Then good descriptions on the level. Use Level sets sometimes, rarely use viewsheets.
I also started with APT back in 1987. I've been programming in MasterCam since 1990 and I use exactly the same method nickbe10 describes here word for word. I tried using level sets, but I just found it to be more clutter. In the end it's really about whatever works for you. One mans organization is another mans clutter. For me Level Sets and View Sheets are just additional maintenance. That's just how my brain works.
I like what Benk said...
On 6/28/2017 at 10:05 AM, BenK said:But with that said, we all use it differently and that is whats great about it, options.
-
I used to develop c-hooks way back in V9 and prior, and I'm getting back into it now. My question is are the advantages to using the VB Net-hook or C# Net-hooks instead of C-hooks? Or are the multiple formats just to accommodate the language someone may be already familiar with? I did notice a forum post that noted you can not access the SQL database tool libraries with Chooks, but had an example of doing it with a Net-hook. I guess the bottom line is, should I switch to VB or C# Net-hooks instead of continuing with C-hooks?
Define reduced neck tool with VB Net-Hook
in Mastercam C-Hook, NET-Hook and VBScript Development
Posted
HOORAY! It works. Thanks Jeff. I spent hours digging through the sample code and never found an example addressing the tool manager using the ToolNetAPI. Your example is exactly what I needed. I just tweaked a few things for VB, and it works. Here's the VB version, try not to sneeze!
Friend Function CreateEMF(P As Integer) As TlToolEndmill Dim toolSystem = TlToolFunctions.GetToolSystem() ' Define a new tool Dim endMill = New TlToolEndmill() With { .OverallDiameter = ToolDia(P), .MfgToolCode = ToolMfg(P), .OverallLength = oa_len(P), .ShoulderDiameter = shldr_dia(P), .ShoulderLength = shldr_len(P), .NeckDiameter = rel_dia(P), .Name = ToolCmnt(P), .ToolNumber = ToolNum(P), .FluteCount = ToolFlts(P), .DiameterOffsetNum = ToolDiaOff(P), .LengthOffsetNum = ToolLenOff(P), .ShankType = shnk_type(P), .TaperLength = rel_len(P)} Dim toolAssembly = New TlAssembly() With {.MainTool = endMill} Return If(Not toolSystem.Add(toolAssembly), Nothing, endMill) End Function