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! > CAM Software > BobCad-Cam


BobCad-Cam Discuss all BobCad software here.


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-16-2003, 11:09 AM
Klox's Avatar
Gold Member
 
Join Date: Mar 2003
Location: NZ
Posts: 509
Klox is on a distinguished road
Question Scripting

Hu,
I have grasp the idea of scripting....eventually (i feel like an idiot confessing this). As i understand scripting is done in Basic. From the posts i've read you wrote about (mostly at the BobCAD support forum) scripting i know you must be a Pro.

Could you give me pointers on books about Basic?

Thanx
Klox

__________________
*** KloX ***
I'm lazy, I'm only "sparking" when the EDM is running....
Reply With Quote

  #2  
Old 05-16-2003, 12:09 PM
HuFlungDung's Avatar
Moderator
 
Join Date: Mar 2003
Location: Canada
Posts: 4,825
HuFlungDung is on a distinguished road

(chuckling at the funny little image in your post)

Klox, I'd hate to give you references that wouldn't help you much because Bobcad's scripting language is ......homemade
I guess the general rules of logic apply, but when unknown traps are lurking under the surface of what should be straight-forward, it can be frustrating.

I've picked up so many bits of info from all over, that I really couldn't point to any book and say: "This is what I used". Studying scripts that other people wrote (ie., scripts that came with Bobcad, plus other cool people that took the time to help me out, like James Bond0h) is where I learned to do it.

The basic principles of what they call Boolean logic, I think, is sort of the starting point: how to work with IF THEN statements, how to make loops, use AND and OR, and ELSE and ELSEIF. Then you have the different types of variables, and how to set them up and call them, how to use a debug tool to test your logic.

I poured over the vb scripting manual that came with Bobcad a lot, trying to understand the rules of syntax (the exact way of writing a command). A bit of study conducted on the internet on unknown terms revealed a lot of material to help clue me on on what I wasn't familiar with.

But, by far, learning by studying other scripts is by far the best tool to learn with. I usually pursued specific ideas that I wanted to encapsulate in a script, and in doing that, went down lots of dead ends of course, but even those teach you something. What do they say: "If you've made a lot of mistakes in a given field, you gain experience, but if you make all the mistakes, then you are an expert" I'm getting close
__________________
First you get good, then you get fast. Then grouchiness sets in.

(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

Last edited by HuFlungDung; 05-16-2003 at 11:32 PM.
Reply With Quote

  #3   Ban this user!
Old 05-16-2003, 10:45 PM
hardmill's Avatar  
Join Date: Mar 2003
Location: United States
Posts: 499
hardmill is on a distinguished road

Originally posted by HuFlungDung
(chuckling at the funny little image in your post)


But, by far, learning by studying other scripts is by far the best tool to learn with. I usually pursed specific ideas that I wanted to encapsulate in a script, and in doing that, went down lots of dead ends of course, but even those teach you something. What do they say: "If you've made a lot of mistakes in a given field, you gain experience, but if you make all the mistakes, then you are an expert" I'm getting close
Well said Hu !!
Reply With Quote

  #4  
Old 05-17-2003, 02:48 AM
Klox's Avatar
Gold Member
 
Join Date: Mar 2003
Location: NZ
Posts: 509
Klox is on a distinguished road

Thanx for your quick replies. The one thing life taught me is that humor takes the bumpiness out of every road we might take.
I try doing some scripts on my own, i'll either swim or drown!!!

Enjoy your weekend!

Klox
__________________
*** KloX ***
I'm lazy, I'm only "sparking" when the EDM is running....
Reply With Quote

  #5  
Old 06-23-2003, 11:42 AM
sorincnc's Avatar
Gold Member
 
Join Date: Mar 2003
Location: U.S.A.
Age: 57
Posts: 107
sorincnc is on a distinguished road

Originally posted by Klox
.I try doing some scripts on my own, i'll either swim or drown!!!

Enjoy your weekend!

Klox
Klox,
What do you have to loose???? Remember, nothing is lost as long you learn something. What I tell all the guys thatt I train is to print as much scripts as possible and the take them one at the time and read them over and over until things seem to make sense when they try to run them. If you go to the "Special\scripts" comand you will be able to select a script and then "execute" it. On the bottom of the script selection window there is a box that you can check called "STEP". This will take through the script step by step (kind like single block on a CNC machine). This is especially good when running a script for the first time because you will find out where the mistake is (most of the time).
Hope this helps,
Sorin
Reply With Quote

Sponsored Links
  #6  
Old 07-07-2003, 10:53 PM
Kookaburra's Avatar
Moderator
 
Join Date: Apr 2003
Location: Australia
Age: 41
Posts: 372
Kookaburra is on a distinguished road

Everyone,

I must add that experience is the best way. I also must add on BobCAD's behalf that their manual shows in great detail how to get from drawing to g-code, well done BobCAD!!! Scripting is a very advanced option and I must admit a very nice option indeed, I use it all the time to create my own drawing and g-code programming facilities and I have found that if you know the fundamentals of basic programming and how scripting works, then most of the information you need to have success is in the BobCAD Manual. I must ask this question, when you buy a car you are given a manual that explains where all of the buttons are and what they do but author of the manual will expect that you at least know how to drive the car.
__________________
"A Helicopter Hovers Above The Ground, Kind Of Like A Brick Doesn't"
Greetings From Down Under
Dave Drain
Akela Australia Pty. Ltd.

(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Reply With Quote

  #7  
Old 07-08-2003, 01:05 AM
Klox's Avatar
Gold Member
 
Join Date: Mar 2003
Location: NZ
Posts: 509
Klox is on a distinguished road

Kookaburra,
Nice to hear from you!
I'm actually a BobWIRE user and i haven't had the need for scripting in BobWIRE yet. The guys i am competing against in my neighbourhood either uses PEPS, MasterCAM, HCAM or even Cameo (can you believe it!).

I got myself BobCAD V18 a while ago and being inquisitive by nature i am checking out scripting. I must admit that i am using V18 a lot as a vehicle to import DXF and IGES files from other packages as it is more powerfull as V16.

I do not have much time to play around with scripting, i have done one experimental script and i see that it would take time to get the hang of it. I must say that it is very interesting!

See you,

Klox
__________________
*** KloX ***
I'm lazy, I'm only "sparking" when the EDM is running....
Reply With Quote

  #8  
Old 07-08-2003, 01:24 AM
Kookaburra's Avatar
Moderator
 
Join Date: Apr 2003
Location: Australia
Age: 41
Posts: 372
Kookaburra is on a distinguished road

Klox,

when you get into scripting and get good at it, it veryyyyy hard to
stop thinking about all the possibilities, the fact that you can manipulate both the nc code and the geometry is beautiful. To get a handle on it first have a look at the sample scripts issued with BCC V18 and work out how the dialogue and variables work then do some script recording eg: set record on and draw a line, then open the script and edit the actual values to be variables, set your code to bring up a pop up window to ask you the values that will be assigned to the variables you have stipulated and see how you go. Once you have the basics it it not a hard climb from there. If you wish you can contact me and I will be happy to help you get started.
__________________
"A Helicopter Hovers Above The Ground, Kind Of Like A Brick Doesn't"
Greetings From Down Under
Dave Drain
Akela Australia Pty. Ltd.

(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Reply With Quote

  #9  
Old 07-08-2003, 04:14 AM
Klox's Avatar
Gold Member
 
Join Date: Mar 2003
Location: NZ
Posts: 509
Klox is on a distinguished road

Kookaburra,
Thanks for the generous offer. First question: Scripting does it "happen" in Basic or Virtual Basic?

Please type a teeny weeny bit slower the next time as i am a slow reader! LOL

Just pulling your leg!!!

Klox
__________________
*** KloX ***
I'm lazy, I'm only "sparking" when the EDM is running....
Reply With Quote

  #10  
Old 07-08-2003, 05:06 PM
Kookaburra's Avatar
Moderator
 
Join Date: Apr 2003
Location: Australia
Age: 41
Posts: 372
Kookaburra is on a distinguished road

Klox,

I would suggest you would call it virtual basic because you are dealing with a piece of software that houses its own library of required statements for calling on functions within the software itself and there are some minor differences in how you arrange the whole program to best work. But if a basic programmer had to learn the scripting environment within BobCAD it would not take much time to get a grasp of what is going on.

For example, in a script you can automatically create a layer, select a line, divide a line, create an arc, etc. These are special cad functions that have to align with a piece of software that can interperet them and perform an on-screen outcome. So I guess BobCAD to a certain extent had to change the "so called normal" to make things work.

Typed slower this time by holding a coffee in one hand and typing with the other.

Clear as Mud ?
__________________
"A Helicopter Hovers Above The Ground, Kind Of Like A Brick Doesn't"
Greetings From Down Under
Dave Drain
Akela Australia Pty. Ltd.

(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 07-14-2003, 05:00 PM
Jennifer's Avatar  
Join Date: Jun 2003
Location: San Diego, CA
Posts: 129
Jennifer is on a distinguished road

Hey Guys!

Every time I try to get into this scripting thing my computer freezes up. I've got the "Intro to BOBCAD Basic..." and following along, doing nothing more than the first exercise (rectangle w/circle) to record a script...I try to play it back...computer rigor mortise. Doesn't make it seem too friendly.

Any thoughts?

Jen
__________________
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Reply With Quote

  #12  
Old 07-14-2003, 05:18 PM
Kookaburra's Avatar
Moderator
 
Join Date: Apr 2003
Location: Australia
Age: 41
Posts: 372
Kookaburra is on a distinguished road

Jen,

Did you edit the script to define all of the variables, popup window, etc. If so, can you give me a better description of what the PC is doing. Are there any error messages or does it just sit there in crash land. Usually this comes from a slight glitch in the scripting code. I will be happy to look at it for you. Feel free to e-mail me the *.bas file for some trouble shooting. A small problem it will be.
__________________
"A Helicopter Hovers Above The Ground, Kind Of Like A Brick Doesn't"
Greetings From Down Under
Dave Drain
Akela Australia Pty. Ltd.

(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Reply With Quote

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
V20 post processors doug6949 BobCad-Cam 5 02-22-2005 07:49 AM
learning Surfcam vs. MasterCam badRandle General CAM Discussion 25 03-12-2004 04:23 PM




All times are GMT -5. The time now is 12:41 PM.





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 354 355 356 357 358 359 360 361