Home > Community > Forums > Functional Verification Shared Code > help with automating adding CLP files to DRA files

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 help with automating adding CLP files to DRA files 

Last post Thu, Jun 12 2014 12:50 PM by oldmouldy. 1 replies.
Started by jen11 12 Jun 2014 11:50 AM. Topic has 1 replies and 2427 views
Page 1 of 1 (2 items)
Sort Posts:
  • Thu, Jun 12 2014 11:50 AM

    • jen11
    • Not Ranked
    • Joined on Thu, Jun 12 2014
    • Posts 1
    • Points 20
    help with automating adding CLP files to DRA files Reply

    Question for forum:

    I’m currently working on a code to automatically add CLP files to DRA files and then add two classes called “APPROVED” and “CLP”. To do this manually you have to open a DRA file, click file import subdrawing and choose the clp file with the same name as dra. (path already set). You then set the clp to position x 0 0. And then click on Set Up > Subclasses > Package geometry and type in “Approved” and “Clp.”

    So far we’ve recorded the macros in Allegro for all of these actions. The macros correspond to one specific file name and we want to apply this to numerous files. To do this we created a python program that locates all of the specified CLP and DRA files, and if they have a matching name, runs a for loop that puts each file name into a stored variable that runs a loop for each file. We converted this script into batch and then added a function that we thought would run Allegro macros from batch.

    In order to get the script working, we need to have an allegro batch command that will run the script without opening the Allegro start popup, or closing the popup when it appears.  We need to do this to run any script from starting Allegro.

    I’ve done another similar program in batch where I made a for loop for each dra file and within the loop there was a batch a2dxf command that converted all dra files to dxf files. Is there a similar batch command for adding clp files to position 0 0 and/ or adding classes? If anyone has done something similar please let me know!

    Thank you very much for the help.

    Jen

    • Post Points: 20
  • Thu, Jun 12 2014 12:50 PM

    • oldmouldy
    • Top 10 Contributor
    • Joined on Tue, Jul 15 2008
    • Woking, Surrey
    • Posts 1,445
    • Points 24,590
    Re: help with automating adding CLP files to DRA files Reply

    By the "allegro pop-up" do you mean the "license picker"? If you do, set a license default for the duration of running the scripts and ensure that one license token of that product is available, or use the "-product <product license name>" command line option to "just use that product license" for running the scripts. There is an enhancement request submitted to add a "use any license" mode command line option to run scripts without being prompted for a license, which will be OK as long as "some" license token is available to run allegro.

    If you mean the "allegro UI" popping up, there is a "-nograph"  option to run allegro without the canvas appearing but my scripts seem to have been ineffective when I have tried to use this option in the past. See the allegro.txt file in the product installation at share\pcb\batchhelp for allegro command line options, the "-product" option, and other options, are documented in that file as well.

    • Post Points: 5
Page 1 of 1 (2 items)
Sort Posts:
Started by jen11 at 12 Jun 2014 11:50 AM. Topic has 1 replies.