Home > Community > Forums > Custom IC SKILL > How to generate completed nets text file.

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: *

 How to generate completed nets text file. 

Last post Mon, Jun 28 2010 2:51 AM by Quek. 3 replies.
Started by lrl12skdev 15 Jun 2010 02:31 AM. Topic has 3 replies and 1246 views
Page 1 of 1 (4 items)
Sort Posts:
  • Tue, Jun 15 2010 2:31 AM

    How to generate completed nets text file. Reply

    Hi everyone,

     I would like to generate a text file listing all the incomplete/complete nets because I need to pass it on to another process. Is it possible to do these via Skill?. show incomplete nets return value is boolean but there is an output window listing the nets so there must be a way I just don't know how at the moment, Any Idea?

    best regards,  lrlsk

    • Post Points: 20
  • Sat, Jun 26 2010 5:52 PM

    • Quek
    • Top 10 Contributor
    • Joined on Wed, Oct 14 2009
    • Singapore, 00-SG
    • Posts 1,084
    • Points 16,515
    Re: How to generate completed nets text file. Reply

    Hi Irlsk

    There does not seem to exists a single SKILL function to get incomplete/complete nets so I made use of the IC5141 showIncompleteNets form as shown below. Hope that it will be useful for you.

    Best regards
    Quek

    ; Tested using IC5141.500.6.142
    procedure( CCSgetNets()
       let( (icNetsForm icNets cNets icPort cPort correctForm)
          lxHiShowIncNets()
          icNetsForm=hiGetCurrentForm()
          if( symbolToString(icNetsForm->hiFormSym)=="_lxvIncNetForm" then
             icNets=icNetsForm->lxIncNetIncompleteListBoxField->choices
             cNets=icNetsForm->lxIncNetCompleteListBoxField->choices
             correctForm=t
          ) ;if
          hiFormCancel(icNetsForm)
       
          if( correctForm then
             icPort=outfile("./incomplete.nets")
             cPort=outfile("./completed.nets")
             foreach(net icNets
                fprintf(icPort "%s\n" net)
             ) ;foreach
             foreach(net cNets
                fprintf(cPort "%s\n" net)
             ) ;foreach
             close(icPort)
             close(cPort)
             printf("Incomplete nets: %L\n" icNets)
             printf("Completed nets: %L\n" cNets)
          ) ;if
       ) ;let
    ) ;procedure

    hiSetBindKey("Layout" "F10" "CCSgetNets()")

    • Post Points: 20
  • Mon, Jun 28 2010 1:25 AM

    Re: How to generate completed nets text file. Reply

    Hi Quek.

    Thank you very much. Your script works perfect and this is exactly what I have in mind. Thanks also for  the attachment, this saves me some time instead of copying and pasting the text because sometimes strange char appear by doing so.

     best regards,

    lrlsk

    • Post Points: 20
  • Mon, Jun 28 2010 2:51 AM

    • Quek
    • Top 10 Contributor
    • Joined on Wed, Oct 14 2009
    • Singapore, 00-SG
    • Posts 1,084
    • Points 16,515
    Re: How to generate completed nets text file. Reply

    Hi IrIsk

    It is good to know that the script is useful for you. : )  Next time when you encounter the strange char problem, try running the file through "dos2unix" cmd.

    linux>dos2unix myfile

    Best regards
    Quek

    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by lrl12skdev at 15 Jun 2010 02:31 AM. Topic has 3 replies.