Beispielskripten: Unterschied zwischen den Versionen

Aus CamBam Wiki
Wechseln zu: Navigation, Suche
(VB-Script Version:)
Zeile 14: Zeile 14:
 
* saving a drawing and creating g-code
 
* saving a drawing and creating g-code
 
*  
 
*  
=== Python version: ===
+
==== Python version:====
 
<code>  
 
<code>  
 
[http://www.google.com/search?client=safari&rls=en&q=cambam.pixelmaker.eu/pages/phocadownload/scripten/mop-automate.py.zip mop.automate.py]</code>
 
[http://www.google.com/search?client=safari&rls=en&q=cambam.pixelmaker.eu/pages/phocadownload/scripten/mop-automate.py.zip mop.automate.py]</code>
  
=== VB-Script Version: ===
+
==== VB-Script Version: ====
 
<code>[http://www.google.com/search?client=safari&rls=en&q=cambam.pixelmaker.eu/pages/phocadownload/scripten/mop-automate.vbs.zip mop.automate.vbs]</code>
 
<code>[http://www.google.com/search?client=safari&rls=en&q=cambam.pixelmaker.eu/pages/phocadownload/scripten/mop-automate.vbs.zip mop.automate.vbs]</code>
 
</code>
 
</code>
 +
----
 +
== Tool Library Automation Python scripts ==
 +
 +
Maintaining large lists of tools in different libraries and across different applications can be a tedious business.
 +
 +
This script is intended to demonstrate various methods to aid tool library maintenance, including:
 +
 +
Finding tool libraries by name
 +
Adding new or removing existing tool libraries
 +
Enumerating tools within a library
 +
Copying tools from one library to another
 +
Finding tools in a library by tool number
 +
Removing and creating new tool definitions
 +
Writing tools to external files (such as a CSV text file)
 +
==== Python version:====
 +
<code>[http://www.google.com/search?client=safari&rls=en&q=cambam.pixelmaker.eu/pages/phocadownload/scripten/tool-library.py.zip tool-library.py]</code>
 +
</code>
 +
----

Version vom 21. April 2013, 14:41 Uhr

MOP Automate VB and Python scripts

This script will automate the process of opening a source file, insert machining operations, set various properties and produce g-code.

These scripts demonstrate:

  • opening a CAD file (.dxf in this example)
  • drawing some extra shapes into the drawing
  • setting machining options
  • Call asynchronous CAD functions such as
  • Edit -> Join and Edit -> Convert to polyline
  • creating a machining operation from objects in a drawing layer
  • setting machining operation properties
  • saving a drawing and creating g-code

Python version:

mop.automate.py

VB-Script Version:

mop.automate.vbs


Tool Library Automation Python scripts

Maintaining large lists of tools in different libraries and across different applications can be a tedious business.

This script is intended to demonstrate various methods to aid tool library maintenance, including:

Finding tool libraries by name Adding new or removing existing tool libraries Enumerating tools within a library Copying tools from one library to another Finding tools in a library by tool number Removing and creating new tool definitions Writing tools to external files (such as a CSV text file)

Python version:

tool-library.py