Results 1 to 10 of 10

Thread: Mastercam VB....?

  1. #1
    Registered
    Join Date
    Nov 2007
    Location
    usa
    Posts
    17
    Downloads
    0
    Uploads
    0

    Mastercam VB....?

    Hello;

    I am newly staring writin Vb on mastercam. I have been using RhinoScript for a long time. I think I understand enough fom VB but, in mastercamVB I am totaly paralyzed.

    Do you guyz know any tutorial or reference with mastercamVB.

    C.


  2. #2
    Registered
    Join Date
    Nov 2006
    Location
    UK
    Posts
    14
    Downloads
    0
    Uploads
    0
    Are you working with stand alone VB, or does Mastercam use VBA (Visual Basic for Applications) as it's macro language?

    Either way, a basic understanding of VB syntax is a good starting point.


  3. #3
    Registered
    Join Date
    Nov 2007
    Location
    usa
    Posts
    17
    Downloads
    0
    Uploads
    0

    VB MasterCam

    Well, MasterCam started to support VB in the new version. I think I know VB as RhinoScript is VB(a little bit modified). It is not the macro language though. I am struggling to understand MasterCams mentality I guess maybe....


  4. #4
    Registered
    Join Date
    Nov 2006
    Location
    UK
    Posts
    14
    Downloads
    0
    Uploads
    0
    Not having access to Mastercam I can't advise further, but found this on another forum:-
    "I understand that Mastercam will have VBA in the near future. This level of automation will be much easier to achieve when it has VBA integrated."
    I would expect to find VBA (if it's there) in the menu system under something like Tools/Macros or something like that. Did look on the Mastercam web site but couldn't find any info (bit poor really). Nothing in the help files??


  • #5
    Moderator Switcher's Avatar
    Join Date
    Apr 2005
    Location
    mydxf.blogspot.com
    Posts
    3665
    Downloads
    0
    Uploads
    0
    I don't work with mastercam (I did stay @ a Holiday Inn, once ), found this pdf on the site, not much info at all.


    Have you ever wished you could automate
    the repetitive tasks you do in
    Mastercam? Perhaps you work with a vendor
    that is always requesting work that is a variation
    on past jobs, and you need the ability to
    quickly update an entire family of parts and
    their toolpaths. In the past, these types of
    customizations were available to only those
    with a good knowledge of programming in C
    language and the appropriate compiler, or the
    money to hire a professional C-Hook writer
    to do the job for them.
    With Version 9.1, Mastercam now has the
    ability to automate tasks using Microsoft's
    Visual Basic® Script, commonly referred to as
    VB Script. This new feature makes automation
    of Mastercam possible for every
    Mastercam user. If you are familiar with creating
    your own macros in MS Word®, MS
    Excel®, AutoCAD® etc., then you will easily
    be able to develop Mastercam scripts. This is
    an invaluable tool for automating repetitive
    tasks, family of parts applications, and making
    complex tasks easier.
    Here's a scenario that could become a reality
    for a customer with a specific product, like
    entertainment centers, that vary in size and
    material. The order gets taken by phone or
    via e-mail. As the order entry is completed,
    a VB Script grabs the sizes, quantities of the
    pieces, and materials that make up the product.
    This information is used by Mastercam
    to create the parts, create toolpaths, nest the
    parts, and send the information to the
    router on the shop floor. How can someone
    who knows Visual Basic do this?
    Although VB Scripts can be written using
    any text editor, the Mastercam V9.1 VB
    Script editor has been developed to make the
    process easier. The Mastercam VB Script
    Editor offers many options to help you
    develop your Mastercam scripts quickly and
    effortlessly. Some of the options include:
    • Syntax Highlighting - Similar to the
    macros in MS Word, Mastercam's color
    syntax highlighting helps to identify
    spelling mistakes that lead to syntax errors.
    Highlight Mastercam-specific functions, VBspecific
    functions, and reserved words to
    make your code easier to read.
    • Intellisense - Mastercam's Intellisense
    gives you access to a drop-down list of
    available Mastercam functions, classes, and
    constants. This feature is great for new
    Mastercam programmers to become familiar
    with all the available functions. Currently
    there are more than 200 functions available.
    • Bookmarks - Bookmarks can be used to
    mark lines of code in the editor so that you
    can easily return to them later.
    • Commenting - Code can be commented
    out or uncommented by selecting the lines
    you want and clicking the applicable menu
    item.
    • Advanced search and replace - Search up
    and down, by word, or by expression and
    replace. Or search for a specific line.
    For a more detailed document covering the
    use of the Mastercam VB Script editor, visit
    www.mastercam.com/VBScript.
    Free DXF Files - myDXF.blogspot.com


  • #6
    Registered
    Join Date
    Nov 2006
    Location
    UK
    Posts
    14
    Downloads
    0
    Uploads
    0
    My understanding is that VB sort of comes in three versions
    1) Visual Basic (VB). A programming language that enables you to create stand alone programs (exe's also dll's), some of which can interact with other programs. I've created a VB exe that uses MS Word to create the end user document, and a VB dll that interacts with Inventor.
    2) Visual Basic for Applications (VBA). This is the MS macro language incorporated into Word, Excel etc. It's also used by other mainstream software, ACAD and Inventor to name just two. Generally the syntax is similar to VB, but not identical as it runs within an application, but does not create stand alone applications.
    3) Visual Basic Script (VBS). A scripting language, again with syntax similar to VB. But it is what it says, just a scripting language more limited in use than VBA. Frequently used for Internet applications as an alternative to JavaScript. http://msdn2.microsoft.com/en-us/library/ms950396.aspx

    If Mastercam includes VBS then they should have covered it in the help files.


  • #7
    Registered
    Join Date
    Nov 2007
    Location
    usa
    Posts
    17
    Downloads
    0
    Uploads
    0

    VB_help Text File

    Thanks,

    They do cover some stuff but more confusing then actually helping though. Having their strange methods... I feel as if it is not flexable and really stiff.

    I am trying to attach the help file.If you guys would like to see...
    Attached Files Attached Files


  • #8
    Registered
    Join Date
    Nov 2006
    Location
    UK
    Posts
    14
    Downloads
    0
    Uploads
    0
    I noticed this in your file -
    If you need to view documentation regarding the VB Script language itself, please refer to SCRIPT56.CHM in the ‘Help’ sub-directory of your Mastercam installation.

    Does this help file contain any real help?


  • #9
    Registered
    Join Date
    Nov 2007
    Location
    usa
    Posts
    17
    Downloads
    0
    Uploads
    0

    Yeah...That one

    That one is the microsofts VB manual.... The same as the website posted in one of the previous posts.
    I was happy when I saw it.
    Well actually, i think i got the problem:
    MasterCam has a very dominant GUI and any command I give it pops up a window. And I cant figure out how to access without windows. (AutoCad with do if you type things with a - in front). So script stops al the time to ask things it allready knows, and doesnt transfer lets say selection to my geometryOperationsEditor...

    If anyone knows about this, it would be so great


  • #10
    Registered
    Join Date
    Sep 2003
    Location
    US
    Posts
    35
    Downloads
    0
    Uploads
    0
    I would probably recommend that you posted your question in the Mastercam section on this forum, there are some very smart people on this forum who know a great deal about Mastercam, they might just not be looking in this section.

    HTH
    Lars


  • Similar Threads

    1. First MasterCAM bug
      By W Brian Marin in forum Mastercam
      Replies: 13
      Last Post: 09-27-2011, 12:28 AM
    2. MasterCam V9 help
      By kiethnt in forum Mastercam
      Replies: 1
      Last Post: 04-15-2007, 11:45 PM
    3. mastercam help!!!
      By xgiao in forum Mastercam
      Replies: 1
      Last Post: 04-06-2007, 11:37 PM
    4. mastercam 9.1 help
      By Mechanical d in forum Mastercam
      Replies: 2
      Last Post: 11-21-2005, 09:56 PM
    5. Mastercam 9.1-2SP and XP SP2
      By tangocc35 in forum Mastercam
      Replies: 7
      Last Post: 01-24-2005, 02:04 PM

    Posting Permissions



    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.