CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > Visual Basic


Visual Basic Discuss Visual Basic programing.


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 11-21-2007, 07:03 PM
 
Join Date: Nov 2007
Location: usa
Posts: 17
cansucuoglu is on a distinguished road
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.
Tweet this Post!Share on Facebook
Reply With Quote

  #2   Ban this user!
Old 11-25-2007, 05:30 PM
 
Join Date: Nov 2006
Location: UK
Posts: 14
PeterCharles is on a distinguished road
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.
Tweet this Post!Share on Facebook
Reply With Quote

  #3   Ban this user!
Old 11-26-2007, 07:35 PM
 
Join Date: Nov 2007
Location: usa
Posts: 17
cansucuoglu is on a distinguished road
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....
Tweet this Post!Share on Facebook
Reply With Quote

  #4   Ban this user!
Old 11-27-2007, 02:52 PM
 
Join Date: Nov 2006
Location: UK
Posts: 14
PeterCharles is on a distinguished road
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??
Tweet this Post!Share on Facebook
Reply With Quote

  #5  
Old 11-27-2007, 03:00 PM
Switcher's Avatar
Moderator
 
Join Date: Apr 2005
Location: Vectorink.com
Posts: 3,659
Blog Entries: 2
Switcher is on a distinguished road
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 - Vectorink.com - myDXF.blogspot.com
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 11-27-2007, 05:43 PM
 
Join Date: Nov 2006
Location: UK
Posts: 14
PeterCharles is on a distinguished road
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.
Tweet this Post!Share on Facebook
Reply With Quote

  #7   Ban this user!
Old 11-27-2007, 06:08 PM
 
Join Date: Nov 2007
Location: usa
Posts: 17
cansucuoglu is on a distinguished road
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
File Type: txt vbscript-MasterCam.txt‎ (59.7 KB, 582 views)
Tweet this Post!Share on Facebook
Reply With Quote

  #8   Ban this user!
Old 11-28-2007, 02:12 PM
 
Join Date: Nov 2006
Location: UK
Posts: 14
PeterCharles is on a distinguished road
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?
Tweet this Post!Share on Facebook
Reply With Quote

  #9   Ban this user!
Old 11-28-2007, 02:45 PM
 
Join Date: Nov 2007
Location: usa
Posts: 17
cansucuoglu is on a distinguished road
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
Tweet this Post!Share on Facebook
Reply With Quote

  #10   Ban this user!
Old 12-06-2007, 09:01 AM
 
Join Date: Sep 2003
Location: US
Posts: 31
Lars is on a distinguished road
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
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
First MasterCAM bug W Brian Marin Mastercam 13 09-27-2011 12:28 AM
MasterCam V9 help kiethnt Mastercam 1 04-15-2007 11:45 PM
mastercam help!!! xgiao Mastercam 1 04-06-2007 11:37 PM
mastercam 9.1 help Mechanical d Mastercam 2 11-21-2005 09:56 PM
Mastercam 9.1-2SP and XP SP2 tangocc35 Mastercam 7 01-24-2005 02:04 PM




All times are GMT -5. The time now is 07:39 AM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353