CM600 RTCP 6-Axis Motion controll
CM300 R 3-Axis Motion controller
CM300 3-Axis Motion controller
Download the bilingual offline manual (ZIP, 16.7 MiB, original images and example attachments)
DXF topic: DXF page and import → Hole table and settings → DXF postprocessing → G196 bore-milling example
Machining Wizard calculates a path from entered dimensions; DXF takes positions from a drawing and adds machining settings. Both eventually return a program to the standard program page.
This chapter explains how the existing DXF entry, page and import script work together. Use the same four-hole drawing throughout this four-chapter topic. Continue with the hole table, postprocessing, then the G196 extension.
The DXF switch is #929.item[12]. It is currently absent from the configuration menu: edit it yourself in the macro parameter window.
#929.item12 in the item table. This spelling omits the brackets; it identifies the same item as #929.item[12] in a script.The current English language pack retains Chinese text for some fields, including this item: DXF导图 is the DXF feature, 否 means No (0), and 是 means Yes (1). The screenshots preserve those actual labels.
#929.item[12] |
Main-screen result |
|---|---|
0 / No (否) |
Hide the DXF entry |
1 / Yes (是) |
Show the entry and allow the DXF page to be opened |
Click the screenshot to view the original image.
Click the screenshot to view the original image.
The switch controls entry and page visibility. It does not choose a hole depth, tool number or coordinate system, or turn the drilling page into a contour-machining page.
Download the four-hole DXF. It contains four independent circles, all on Z=0, without additional contours.
| Initial number | Center X | Center Y | DXF radius | Actual diameter |
|---|---|---|---|---|
| NO.1 | 10 | 10 | 2 | 4 |
| NO.2 | 40 | 10 | 2 | 4 |
| NO.3 | 10 | 35 | 2 | 4 |
| NO.4 | 40 | 35 | 3 | 6 |
Click DXF on the main navigation bar, then Import DXF, and choose this file. DXF is a main entry alongside Program, not a fourth child page after Toolpath Preview, File Management and Machining Wizard.
Click the screenshot to view the original image.
Figure 3: NO.2 is selected and its Bottom Z has been changed to −7. The other holes use −5. Drag the page dividers to give the table and input area enough space.
| Area | What it contains |
|---|---|
| Drawing area | Imported circles and the connections drawn between holes during generation |
| Hole table | Selection, center, geometric size and G81/G82/G83 method |
| Upper-right settings | Tool, spindle speed, bottom Z, R plane, feed and other values for the selected hole |
| Sorting and filtering | Which holes participate and how their positions are ordered |
| Header and Footer | Fixed text before and after the generated section |
| Body | The complete editable text produced by Gen G-Code, including header and footer |
In this version, the column labelled “Dia.” actually displays the DXF circle radius. The first three circles therefore show 2 and the fourth shows 3. Filter Dia. uses that same radius value. This chapter keeps the actual interface wording and explains the numbers the implementation reads.
In env/maininterface/maininterface.ui, the DXF label is named label_49. Its relevant attributes are:
-A: (clickedEvent:/env/dxfpage[0](#810permission=7))
-C(#929item12==1)
-V0
Read them in this order:
#929item12==1 tests whether the DXF switch is on.-V0 uses condition 0 to control visibility; the entry is visible when it is true.#810.permission=7 to select DXF, then runs /env/dxfpage.[0] selects the main Qt script channel, as in the earlier main-page examples.Here is the complete env/dxfpage script:
IF#899.version==1GOTO1
#899.version=1
#899.itemdesc[0]="/env/dxf/dxf.ui"
widgetFunc["QFrame","dxfframe","refresh",""]
N1
#899.itemdesc[0] supplies the UI path. The main window's dxfframe loads that page. Here, #899.version means “already loaded,” avoiding reconstruction on every click. The main frame also checks #810.permission==7 and the DXF switch when deciding whether to display the area.
This repeats the multipage method: the entry changes a page-selection parameter, the frame controls visibility, and a script loads the UI on first use.
The page file is env/dxf/dxf.ui. Use this table to find the starting point for each operation.
| Native control | Object name | Script | Main result |
|---|---|---|---|
| Import DXF | pushButton_43 |
dxfloader |
Read geometry, build the hole list and copy defaults to every hole |
| Up / Down / Top | pushButton_5 / pushButton_34 / pushButton_3 |
uppath / downpath / headpath |
Change which hole number each displayed row refers to |
| Save Params | pushButton_35 |
saveDrillParam |
Make the current hole's settings the defaults for later imports |
| Hole Filter | pushButton_37 |
holeselect |
Reset hole checkmarks according to a size comparison |
| Gen G-Code | pushButton_44 |
generatecode |
Collect per-hole settings, generate text and refill Body |
| Save/Load | pushButton_42 |
loadgcode |
Save Body to an NC file and hand it to the existing program page |
All scripts in this table are under env/dxf/. Import DXF and Save/Load use mouse-release events; the other listed buttons use click events. When tracing a button, inspect its event attribute rather than guessing a filename from its caption.
This topic also includes the complete import script, generation script and save/load script, for reading alongside this chapter and the following chapters.
dxfloader opens a file picker, then uses two built-in operations. Its opening section is:
#100=""
widgetFunc["openFileName","*.dxf","",100]
IF#100==""GOTO2
widgetFunc["readDxf",#100,"",0]
#100 receives the selected path. The script then joins #6002.item[0] through #6002.item[9] into a colon-separated string of default settings and calls:
widgetFunc["dxfDrillInit","","",#6001.description]
The responsibilities are distinct:
readDxf reads geometry. File entities enter the software's internal drawing data.dxfDrillInit creates the drilling list. It extracts centers and radii from circle entities across the drawing's layers, creates #6001 records and draws the circles.dxfloader prepares per-hole settings. It allocates one item per hole in #6003 through #6012, then copies defaults, input types and option text from #6002.Reading an entity does not automatically make it a drilling hole. This page selects circle entities. A closed polyline or several arcs that look like a circle do not automatically enter this hole list. The page also has no input for choosing holes by layer name.
Reimporting rebuilds the list and per-hole settings and clears the old Body text. Save an NC result before reimporting if you want to keep it. To keep a set of defaults, select the appropriate hole and click Save Params first.
The configuration does not allocate ten consecutive parameter numbers for each hole. Each setting has one parameter number; different holes occupy its different items. All bottom-Z values are in #6007, for example, and all feeds are in #6012.
The import script first clears the item counts of #6003 through #6012, then sets each count to the number of holes. Its outer loop visits holes; its inner loop copies the settings:
#[6003+#6002.channel].itemunit[#6002]=#6002.itemunit[#6002.channel]
#[6003+#6002.channel].itemtype[#6002]=#6002.itemtype[#6002.channel]
#[6003+#6002.channel].item[#6002]=#6002.item[#6002.channel]
Here the main value of #6002 temporarily holds the hole index, and #6002.channel holds the setting index. The defaults themselves remain in #6002.item[...]. For the original NO.2's feed, the hole index is 1 and the setting index is 9, so the third line means:
#6012.item[1]=#6002.item[9]
The first two lines also copy the input type and option labels. Copying defaults therefore involves more than values: to create a combo box, the table needs an option-type definition and its choice names. After import, every hole has its own values; editing NO.2 changes neither the defaults nor NO.1.
| Symptom | First check |
|---|---|
| No DXF entry | Inspect #929.item[12] in the macro parameter window, not just the configuration menu |
| A circle-shaped object is absent from the table | Confirm that its entity is a circle; polylines are not automatically treated as holes |
Imported holes now have indices and their own default settings. The next chapter uses those values to explain table selection, drawing highlights and the right-hand inputs.
Previous lesson: Machining Wizard · Reading guide · Next lesson: Hole table and settings