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:

Recommended Posts

1 hour ago, Peter Evans said:

I'm pretty sure it's just a glitch in the Template.. I legit had the exact same problem the first time I tried to make a NETHOOK and never again after that.

 

2 hours ago, Peter Evans said:

By the looks of it you are trying to set up a C# or VB.NET hook using visual studios and are having issues mounting the hook on startup?

 

Yes, as long as the file is in my chooks folder it gives me that error every time even though Mastercam will run the hook from "Run Add-ins". Do you know if there's any video tutorials on Mastercam hooks or are the files on the Mastercam site + forums my only resource?

Link to comment
Share on other sites
1 hour ago, DeerSausage said:

 

Yes, as long as the file is in my chooks folder it gives me that error every time even though Mastercam will run the hook from "Run Add-ins". Do you know if there's any video tutorials on Mastercam hooks or are the files on the Mastercam site + forums my only resource?

I don't know of any video tutorials unfortunately there is only the limited existing documention. Did you add the function table? .ft file to your c-hook folder and rename it to the correct project?

Link to comment
Share on other sites
58 minutes ago, DeerSausage said:

 

Yes, as long as the file is in my chooks folder it gives me that error every time even though Mastercam will run the hook from "Run Add-ins". Do you know if there's any video tutorials on Mastercam hooks or are the files on the Mastercam site + forums my only resource?

Judging by the error message I'd say the dnRES_NAME in the .ft is not set correctly.

 dnRES_NAME should point to the .resx file in the Resources folder as shown below.
example_2.png.55aed7f0a3e4b4233955324d68ef97c1.pngexample_1.png.ed789370794c8365865f5b9c2b5145d5.png 

 

I highly encourage you to create an account on the official Mastercam forums so you'll have access to the NET-Hook documentation

Link to comment
Share on other sites

your function table should be something like this

###############################################################################
# NETHook function table			
###############################################################################
#
# Name		: Parametric_Shapes.ft
# NETHook 	: Parametric_Shapes.DLL
# Date		: 2019-7-14
# Author	: Peter Evans
# Notes		:  ** Update all Parametric_Shapes references with the projects name **
# Language	: C#
#
###############################################################################


######################
# ASSIGN A UNIQUE NAME
######################
APPLICATION "Parametric_Shapes"

######################
# NETHook LOCATION
######################
#
# Update paths below to match your install path and project name.
FUNC_DLL   "CHOOKS\Parametric_Shapes.dll"
RES_DLL    "SAME"
dnRES_NAME "Parametric_Shapes.FunctionTable.Resource"
CATEGORY   "Parametric_Shapes"

##############################################################################
# Public functions here
##############################################################################
#
# The main system entry point defined in NethookMain.cs
FUNCTION NET "Run"
    dnSPNG "Run16"
    dnLPNG "Run24"
    dnTIP  "RunTip"
END_FUNCTION

# EOF

also in visual studios under

function table

assets 

try editing the run16 and run32 images saving and recompiling

then see if you can add a button with the images

 

 

Link to comment
Share on other sites
16 hours ago, jeff.D said:

Judging by the error message I'd say the dnRES_NAME in the .ft is not set correctly.

 dnRES_NAME should point to the .resx file in the Resources folder as shown below.
example_2.png.55aed7f0a3e4b4233955324d68ef97c1.pngexample_1.png.ed789370794c8365865f5b9c2b5145d5.png 

 

I highly encourage you to create an account on the official Mastercam forums so you'll have access to the NET-Hook documentation

Yes sir, that's what it was. Thanks Jeff. I will make an account and see what I can learn there.

Link to comment
Share on other sites
16 hours ago, Peter Evans said:

your function table should be something like this


###############################################################################
# NETHook function table			
###############################################################################
#
# Name		: Parametric_Shapes.ft
# NETHook 	: Parametric_Shapes.DLL
# Date		: 2019-7-14
# Author	: Peter Evans
# Notes		:  ** Update all Parametric_Shapes references with the projects name **
# Language	: C#
#
###############################################################################


######################
# ASSIGN A UNIQUE NAME
######################
APPLICATION "Parametric_Shapes"

######################
# NETHook LOCATION
######################
#
# Update paths below to match your install path and project name.
FUNC_DLL   "CHOOKS\Parametric_Shapes.dll"
RES_DLL    "SAME"
dnRES_NAME "Parametric_Shapes.FunctionTable.Resource"
CATEGORY   "Parametric_Shapes"

##############################################################################
# Public functions here
##############################################################################
#
# The main system entry point defined in NethookMain.cs
FUNCTION NET "Run"
    dnSPNG "Run16"
    dnLPNG "Run24"
    dnTIP  "RunTip"
END_FUNCTION

# EOF

also in visual studios under

function table

assets 

try editing the run16 and run32 images saving and recompiling

then see if you can add a button with the images

 

 

Awesome, it's working now. I basically just made it look exactly like yours. Learning new things every day. Thanks for all the help, peter!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

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