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:

Bounding Box Question


mmetzinger
 Share

Recommended Posts

No but you can use a script to access the bouding box without having to go to the meun if you like here it is.

code:

'////////////////////////////////////////////////////////////////////////////////

'//

'// Author: Ronald Branch

'// Date: 04/05/2004 07:26 AM

'// File Name: Boundbox

'//

'// Description: Mastercam VB Script

'//

'// Comments: Will make Bounding Box on Certain Level any Color you want

'// Use this at your own risk.

'//

'////////////////////////////////////////////////////////////////////////////////

Dim zlevel 'Level in which to put Bounding Box

Dim zcolor 'Color in which to make Bouning Box

'Dim t 'View in which to see part and bounding box

 

zlevel = mcCONSTRUCTION_LEVEL_CURRENT

zcolor = mcCONSTRUCTION_COLOR_CURRENT

 

Call Main

 

 

Sub Main

 

If askYesNo("Do You Want to Change the Level") Then

If Not askLevel(zlevel) Then

zlevel = mcCONSTRUCTION_LEVEL_CURRENT

End If

End If

 

If askYesNo("Do You Want to Change the Color") Then

If Not askColor(zcolor) Then

zcolor = mcCONSTRUCTION_COLOR_CURRENT

End If

End If

 

 

' If askNumber("What View to Make Bounding Box 1:Top 2:Front 3:Back 4:Bottom 5:Right 6:Left 7:ISO" ,0 ,7 ,t) Then

' SetGViewNumber (t)

' End If

 

RunMastercamCommand "makebbox"

' SetLevelName (r,Bounding Box)

SetGViewNumber (7) 'Just take out ' above and put here to have it end at a certain view

RunMastercamCommand "fit"

 

End Sub

It needs alot of work but if you take out the question it will just do the bounding on its own. You can then assign the VB script to a toolbar and instant Bounding box without all the mouse clicks

Link to comment
Share on other sites

Upon thinking about this you can get the Mastercam to load the way you want I think. I do not have access to the Hasp at home. But put the script in the fileget and when you run fileget on startup you will get the bounding box right after that it is will when working correct put the bounding box on seperate level, make it a different color, put the view at isometric, and it will fit the screen all from load up if you use the shortcut on the screen to call Mastercam as well as use the fileget script and methos ot access this. Oh yeah fileget works with a Nethasp as well.

Link to comment
Share on other sites

Well Mick put up this is a thread:

code:

Call Main

 

Sub Main

 

RunMastercamCommand "fileget"

 

End Sub


Back on this thread: File Get at Startup

 

I am saying I think you can add the above script for the bounding this script then when you click the shortcut for Mastercam you will get the filegte and when the file get is complete it might go and do the boudning box after that is complete. I do not know enough yet about this stuff but if it worked then there would be your possible way of getting what he is trying to do here. Mick or Rekd or Bulliness or some of the others would have a better idea than me. Just was thinking out loud.

Link to comment
Share on other sites

Yeah that was a great thread.

Ernie you can put your vb files at start up by

quote:

Edit your shortcut to Mastercam, right click it and select Properties, in the Target field append the name of the script, for example;

code:

C:Mcam9ROUTER9.EXE fileget.vbs


Here you can replace the fileget.vbs by your vb file name.

 

Hardmill replace your code with this

code:

Call Main 

Sub Main

RunMastercamCommand "fileget"

RunMastercamChook "MCutils.DLL"

End Sub

This was also covered in that thread only.

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