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:

Getting kicked out of backplot in X2


Recommended Posts

I created some scripts that consist of 2 consecutive RunMastercamCommand commands. They change view and then Screen Fit. I used ScriptLinker to create NET hooks so I could create a toolbar of them and replace the existing MC view icons. I also added them to my RMB.

 

The problem is whenever I'm in backplot or verify, running the scripts/Net hooks exits me out. Is there anything I can add to the code so I can still use them while in backplot or verify? I want them to function like the standard MC view commands.

 

Another problem that I've run into with these is that the RMB doesn't show the icons. Here's a screen shot.

. noicons.jpg

 

Here's the thread that prompted it all.

 

Thad

Link to comment
Share on other sites

MasterShake,

 

I tried that before I posted this and it didn't work. Is this the right place?

 

code:

###############################################################################

# NETHook function table

#

# Auto generated by 'Script Linker' (11/10/2006 2:31:15 PM)

#

###############################################################################

#

# Name : FrontFit.FT

# NETHook : FrontFit.DLL

# VBScript : FrontFit.VBS

#

# Notes : This FT file MUST be located in the '<mcamx>chooks' folder.

# The FRONTFIT.VBS file MUST be located in the VB Scripts folder specified in Mastercam X Configuration

#

###############################################################################

#

######################

# ASSIGN A UNIQUE NAME

######################

APPLICATION "FrontFit_RunVBS"

#

######################

# NETHook location

######################

FUNC_DLL "C:McamX2chooksFrontFit.DLL"

RES_DLL "SAME"

dnRES_NAME "myRes"

CATEGORY "VB Scripts"

#

########################

# Public functions

########################

#

FUNCTION NET "Run"

dnSBMP "IDB_SBMP"

dnLBMP "IDB_LBMP"

dnTIP "IDS_TIP"

INLINE <----------------

END_FUNCTION

#

# EOF

Thad

Link to comment
Share on other sites

Thad,

 

We had that error on the other seat of Mc.

(cannot find script file)

 

On the sucessful one, it put the .vbs in the Chook folder automatically.

 

After the error appeared:

 

On the other p.c. we just tried copying the .vbs to the Chook folder from where they were originally located (after running the scriptlinker,restating and getting that error etc)and the error did not re-occur.

 

I noticed that in my RMB the icons are sorta greyed out. Like something doesent know where to find the icon's locale.

 

icons-1.jpg

 

 

I dunno if any of this helps?

Rick

Link to comment
Share on other sites

woot, I just called your VBSCript file with reraltive path(not full path).

that caused the problem.. sorry.

 

When you open File Dialog and select a file name to save/open, the currect directory path setting is changed.

 

I will fix the problem later..

or should I make a chook in c/c++?

it may fix RMB icon problem..

Link to comment
Share on other sites

MasterShake,

 

The new version seems to work OK. You are right, the icons show up in the RMB now.

 

Is there any reason why the scripts have to go in the chooks folder? Logic tells me they should go in the VB folder. It doesn't really matter, I was just wondering.

 

Thanks.

 

Thad

Link to comment
Share on other sites

MasterShake,

 

I just noticed something. I have a CHOOKS subfolder in the folder of the jobs that I've worked on since using your files. I assume they're from the latest version of your files since they are dated today. In fact, the chooks folder is dated the exact same time and date as the last save on my MCX file. The folder is empty.

.

.

chooksfolder.jpg

 

Thad

Link to comment
Share on other sites

I think your chooks are related because not every seat of MC is using your chooks. Only the ones that are have the unexplainable chooks folder. To my knowledge, that's the only thing that has changed. Now, I'm trying to get it to repeat and I can't.

 

headscratch.gif

 

Thad

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