• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X PCB Editor
  3. NC Drill

Stats

  • Replies 4
  • Subscribers 161
  • Views 13758
  • Members are here 0
More Content

NC Drill

SKILLBILL
SKILLBILL over 15 years ago
Hello First post on this forum :) So far i was learning from your experience searching everything in this forum wiithout asking a single question. I want to thank all who share information on this forum, especially eDave, Ole, Oldmoudy and vramanan. You are my gurus. You probably dont know it but you helped me a lot =D Ok back to the point. I am facing dificulty. Basicly i am stuck with nc drill. What I have to do: I need to generate NC Drill (Exactly i need .drl file) Manualy there is no problem to make this file. I go to Manufacture >> NC >> NC Drill and click Drill Question is how to do it with a script. I tried with nctape_full function but no luck. Have anyone used this function before, and can show an example ? Can anyone give me an idea how to use this function and execute this Drill command. There must be a way. If it can be done manualy there has to be a way to automate it. Help please I read in this presentation www.cadence.com/.../5.4_presentationIndia.pdf that there is a way to execute multiiple commands ("Single stroke with multiple commands" section) for example alias
  • Cancel
  • Sign in to reply
Parents
  • djhutchi
    djhutchi over 15 years ago

    There are a couple of different ways of doing this; you could use axlRunBatchDBProgram() to run the nctape external command:

         axlRunBatchDBProgram("nctape" "nctape -$" ?logfile "ncdrill.log")

    or use a block of axlShell commands to emulate the interactive menu picks:

                    axlShell("nctape_full ")
                    axlShell("setwindow form.nc_drill")
                    axlShell("FORM nc_drill tape_name ncdrill.drl")
                    axlShell("FORM nc_drill scale 1.00")
                    axlShell("FORM nc_drill parameters")
                    axlShell("setwindow form.nc_parameters")
                    (status = car((axlDBGetDesignUnits)))
                    if( equal(status "mils") || equal(status "inches") then
                        axlShell("FORM nc_parameters integer_places 2")
                        (status = EPG_GetAccuracy())
                        if( greaterp(status 4) then
                            if( lessp(status 7) then
                                sprintf(status "FORM nc_parameters decimal_places %d" status)
                                axlShell(status)
                            else
                                axlMsgPut("  reduced output format accuracy from %d to 6" status)
                                axlShell("FORM nc_parameters decimal_places 6")
                            )
                        else
                            axlShell("FORM nc_parameters decimal_places 4")
                        )
                        axlShell("FORM nc_parameters english_units YES")
                    else
                        axlShell("FORM nc_parameters integer_places 3")
                        (status = EPG_GetAccuracy())
                        if( greaterp(status 4) then
                            if( lessp(status 7) then
                                sprintf(status "FORM nc_parameters decimal_places %d" status)
                                axlShell(status)
                            else
                                axlMsgPut("  reduced output format accuracy from %d to 6" status)
                                axlShell("FORM nc_parameters decimal_places 6")
                            )
                        else
                            axlShell("FORM nc_parameters decimal_places 4")
                        )
                        axlShell("FORM nc_parameters metric_units YES")
                    )
                    axlShell("FORM nc_parameters suppress_lead_zeroes YES")
                    axlShell("FORM nc_parameters suppress_trail_zeroes NO")
                    axlShell("FORM nc_parameters suppress_equal NO")
                    axlShell("FORM nc_parameters enhanced_format YES")
                    axlShell("FORM nc_parameters done")
                    axlShell("setwindow form.nc_drill")
                    axlShell("FORM nc_drill repeat_codes NO")
                    axlShell("FORM nc_drill auto_tool_select YES")
                    axlShell("FORM nc_drill execute")
                    axlShell("setwindow form.nc_drill")
                    axlShell("FORM nc_drill close")
                    axlShell("setwindow pcb")

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • djhutchi
    djhutchi over 15 years ago

    There are a couple of different ways of doing this; you could use axlRunBatchDBProgram() to run the nctape external command:

         axlRunBatchDBProgram("nctape" "nctape -$" ?logfile "ncdrill.log")

    or use a block of axlShell commands to emulate the interactive menu picks:

                    axlShell("nctape_full ")
                    axlShell("setwindow form.nc_drill")
                    axlShell("FORM nc_drill tape_name ncdrill.drl")
                    axlShell("FORM nc_drill scale 1.00")
                    axlShell("FORM nc_drill parameters")
                    axlShell("setwindow form.nc_parameters")
                    (status = car((axlDBGetDesignUnits)))
                    if( equal(status "mils") || equal(status "inches") then
                        axlShell("FORM nc_parameters integer_places 2")
                        (status = EPG_GetAccuracy())
                        if( greaterp(status 4) then
                            if( lessp(status 7) then
                                sprintf(status "FORM nc_parameters decimal_places %d" status)
                                axlShell(status)
                            else
                                axlMsgPut("  reduced output format accuracy from %d to 6" status)
                                axlShell("FORM nc_parameters decimal_places 6")
                            )
                        else
                            axlShell("FORM nc_parameters decimal_places 4")
                        )
                        axlShell("FORM nc_parameters english_units YES")
                    else
                        axlShell("FORM nc_parameters integer_places 3")
                        (status = EPG_GetAccuracy())
                        if( greaterp(status 4) then
                            if( lessp(status 7) then
                                sprintf(status "FORM nc_parameters decimal_places %d" status)
                                axlShell(status)
                            else
                                axlMsgPut("  reduced output format accuracy from %d to 6" status)
                                axlShell("FORM nc_parameters decimal_places 6")
                            )
                        else
                            axlShell("FORM nc_parameters decimal_places 4")
                        )
                        axlShell("FORM nc_parameters metric_units YES")
                    )
                    axlShell("FORM nc_parameters suppress_lead_zeroes YES")
                    axlShell("FORM nc_parameters suppress_trail_zeroes NO")
                    axlShell("FORM nc_parameters suppress_equal NO")
                    axlShell("FORM nc_parameters enhanced_format YES")
                    axlShell("FORM nc_parameters done")
                    axlShell("setwindow form.nc_drill")
                    axlShell("FORM nc_drill repeat_codes NO")
                    axlShell("FORM nc_drill auto_tool_select YES")
                    axlShell("FORM nc_drill execute")
                    axlShell("setwindow form.nc_drill")
                    axlShell("FORM nc_drill close")
                    axlShell("setwindow pcb")

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information