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:

Custom Right Click Menu Chook


bryan314
 Share

Recommended Posts

  • Replies 166
  • Created
  • Last Reply

Top Posters In This Topic

Bryan,

 

I just wanted to see how it works. My intenstion is to merge files. For example, when I do an electrode that is mounted in a 3R holder, I want to bring it into my file. I use it in the setup sheet to help the machinists understand the orientations. There are a few things I use periodically that I want to merge.

 

Is it possible that you send me just one "pattern" so I can better understand the functionality.

 

Thanks,

 

Code_Breaker

cheers.gif

Link to comment
Share on other sites

Code_breaker,

 

No need. Just edit the filename in the module to the filename of your own files.

 

I'm at home at the moment but when I get in on Monday I'll try to put together an example for you.

 

In the mean time I'll try to explain how that module works. The examples in the readme file might be a little rushed. (again, at home don't have it in front of me)

 

The module does some behind-the-scenes trickery with Mastercams 'insert pattern' function and 'Entity attribute manager.' Insert pattern being mastercams function allowing you to merge/insert the cad data from another mc9 file into the current session at a specific point. EA manager, when turned on, overides any entities created to fit specific pattern. Ie, arcs on level 1 or line only color 2.

 

I've found the following technique to work better than what I did with my (now very dated) Insert Hardware chook. With that I wrote my own insert function out of frustration with mastercams insert pattern. But since I only understand a fraction of the how MC works it was limited to just lines, arcs, points, and few other odds and ends like notes. One of my biggest bitches with Insert Pattern has always been the all or nothing attitude when inserting a file. Either you get the file 'as is' with its colors, levels, and attributes or you overide EVERYTHING. 90% of the time I only want to overide JUST THE LEVEL, leaving the colors and attributes ALONE. Colors and attributs have very specific meanings for our designs.

 

EA manager is nice but there's no way to tie setting to and external file. Also EA is nowhere near Instert pattern and is buried under alot of menus making it very hard to use Insert Pattern and EA together.

 

STEPS

=====

1) The module backs up the current setting for insert pattern and ea manager.

2) Sets the filename for insert pattern and Bulk sets the ea manger parameters per the module.

3) Runs insert pattern.

 

At this point you use insert pattern as you normally would. The benefits being you don't have to dig through your hard drive to find the file your looking for. This is especially annoying if you use a library of files. Also allows you to overide additional specifics through the ea. For example overide level so anything created through insert pattern ends up on one level. Another benifit is even while insert pattern is running you can open ea and do further fine grain tweaks.

 

4) After finishing with insert pattern and exiting the function the module restores your insert pattern and ea settings.

 

Hope that helped. frown.gif

 

Bryan smile.gif

Link to comment
Share on other sites

Also The menu2 chook I included with the latest zip file and the insert pattern module are just made for each other. cheers.gif

 

The menu2 chook allows you to create custom menus like the rightclick. When used on the toolbar they look just like dropdown menus. It can be copied and renamed thus allowing you to run two, three, 100 different instances. Each with a different menu. biggrin.gif

 

Instert Pattern Module allows you to group various libraries of files together.

 

Thus putting two or three of these 'libraries' on your toolbar give you a primitive library manager with drop-down menus. biggrin.gif

 

Bryan smile.gif

Link to comment
Share on other sites

Thanks Bryan, looking forward to the example.

 

BTW, what's with James lau? Is that the direction MC VX is going? In a way I hope not, I like to keep the icons at the top. It is much faster for me. I often use the right button as an "enter" key. With mmouse, I have to move into the grey area, otherwise the menu pops up when not needed.

 

Which reminds me, can that be fixed?

 

Code_Breaker

cheers.gif

Link to comment
Share on other sites

Bryan,

 

This is a great tool, thank you so much. I was just wondering if it would be possible to ad the autohighlight function to the menus. I tried a few things but came up empty. Thanks again for this great tool.

 

Have a nice day,

Link to comment
Share on other sites

Martin,

 

If you mean the Autohighlight that is on the original right-click menu that's not possible. Mastercam never made that variable available in the chook sdk. frown.gif It's not part of the toolbar functions either. frown.gif

 

So, unless the variable is one of the supersecret variables headscratch.gif that they don't make available in the sdk. AND somebody can tell me what it is. I can't. My guess is it's not even one of the supersecret variables.

 

frown.gif Sorry.

 

Bryan smile.gif

Link to comment
Share on other sites

Bryan,

 

I haven't receive the e-mail you were going to send explaining "insert Pattern". What I want to be able to do is "merge" another file into the opened file. For example, I have an mc9 file called 3rholder.mc9. It is a sold of our 3R electrode holder. Whenever I am working on an electrode that goes into this holder, I merge the file. I use this in my setup sheet. I also have called origin.mc9. I use this on as well for setup.

 

I changed this:]

 

code:

			{ "module", "pattern", "1/4 Bolts", --menu string

"U:/Lib/Bolts/250BOLT.MC9", --module will translate / to in

false, --use main color [M]

true, --use main level [L]

true, --use main attrb [A]

true, --try to clean groups [G]

},

to this

code:

			{ "module", "pattern", "1/4 Bolts", --menu string

"C:/Mcam9/Templates/origin-small.mc9", --module will translate / to in

false, --use main color [M]

true, --use main level [L]

true, --use main attrb [A]

true, --try to clean groups [G]

},

But it did not work. banghead.gif

 

What can I do to make this work?

 

Code_Breaker

cheers.gif

Link to comment
Share on other sites

Code_Breaker,

 

Sorry frown.gif I'm swamped at work and haven't had time to put anything together. I created a dummy file origin-small.mc9 and stuck it in a templates sub-directory on my harddisk and your code works fine. headscratch.gif ???

 

Can you email me your .lua file?

 

Bryan smile.gif

Link to comment
Share on other sites

If anybody is interested here's an icon for the mmouse chook. Put the bitmap in the [mastercam directory]/common/icons/ directory.

 

mmouse.bmp

mmouse bitmap

 

A couple others (again if you're interested)

 

clipbrd.bmp

Mastercam Function Screen-to-clipboard bitmap

 

pattern.bmp

pattern bitmap I use it for a menu2 chook with a bunch of patterns in it. But you could use it for Mastercam's insert pattern function.

 

Plot.bmp

plotter bitmap

This one was created by a coworker

 

setdirs.bmp

set directories bitmap

 

Bryan smile.gif

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