![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| BobCad-Cam Discuss all BobCad software here. |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| ||||
| ||||
Working on scripting to generate Gcode. So far all the code is working for one of my projects. However when I incorporate a Loop function in the script it dose not run. Is anyone here done a loop function in BobCAD V20 script to generate Gcode? If so, how dose the syntax work for the loop function. |
|
#6
| |||
| |||
| But a quick glance showed there was no For/Next loop defined at your start/end loop comments. Also, are you familiar with the Step checkbox when you run the script from the CAD side? This opens a window that shows the script being executed line by line. You can also list variables to monitor their values during execution. Somewhere...I have a script written to do this very operation, but can't find it now. moldmker |
|
#7
| |||
| |||
| Here's your script back. Added: 1. For/Next loop to create helical code. 2. Function that checks to see if total depth divided by pitch = whole number. If not, the pitch is altered so that # of turns is a whole number.(caution required if threadmilling) 3. Various small changes to clean up code. See if this works for you. I checked only for math errors and code output, I didn't try to break it or see how it would act with various +/- inputs. (read: no warranty expressed or implied) Cool thing about scripts is they can be changed to give the EXACT code you want to see at the machine. moldmker |
|
#9
| |||
| |||
| I have searched, but I did not find anything other than the examples in this thread and a couple of pages in the help file. How do we even access this feature? Where do we put scripting files? How do we refer to these features in BobCad so that they get picked up? Thanks! |
|
#10
| |||
| |||
| Ed, there is some info on the BobCAD support forum site about scripting. It is NOT in the scripting section however. That area is mostly reserved for V21 and older scripting. http://www.bobcadsupport.com/forum/s...ead.php?t=4016 This should give you a quick crash course. |
| Sponsored Links |
|
#11
| |||
| |||
| Interesting, not quite what I was thinking... In Summary: You define extra parameters for existing features in files named PostName.FeatureName and you place these in the post folder. These parameters will be displayed as a "Adv Posting" item in the feature tree. Then you then put VB code in your post to access these variables and do things. The problem is that the post only knows how to do very simple things... So if you want to create a replacement feature (or intercept an existing feature) to "pocket circular holes" or do "simple profiling of an open chain consisting of a single line" your plug-in point is too low in the chain. There is a "Null tool change" script element that perhaps together with "Tool change" gets called at least once for each feature. If the VB variables you create continue to exist in between calls to post building blocks you might be able to get creative there. May be you can use it to optionally remove unwanted cycles that BobCad does not remove, for example I have not found a way not to generate the milling step in the reaming feature, setting the tool diameter to 0 does not work in this instance. Hmmm... even if it works there might be other gotchas |
|
#12
| |||
| |||
| Editing the toolpattern can remove ops from a feature. Does this not do what you are talking about here? |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Open Loop to Closed Loop Stepper Conversion | beamhome | Stepper Motors and Drives | 9 | 05-24-2012 02:46 AM |
| BOBCAD Model Airplane Wing Design Script | cely | BobCad-Cam | 6 | 08-20-2009 10:11 PM |
| Need help with VB script Syntax Please. | Adamj12b | Mach Software (ArtSoft software) | 6 | 09-18-2008 07:18 AM |
| Need Help!- Bobcad and script letters | Claude Boudreau | BobCad-Cam | 6 | 03-25-2008 05:50 AM |
| question on closed loop vs open loop (servo systems) | boonie | Servo Motors and Drives | 20 | 11-09-2007 12:30 PM |