Home > Community > Forums > PCB SKILL > PCB: Properties attached to a component instance

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

 PCB: Properties attached to a component instance 

Last post Tue, May 31 2011 1:14 PM by eDave. 4 replies.
Started by Thierry22 07 Apr 2011 10:06 AM. Topic has 4 replies and 2216 views
Page 1 of 1 (5 items)
Sort Posts:
  • Thu, Apr 7 2011 10:06 AM

    • Thierry22
    • Not Ranked
    • Joined on Thu, Apr 7 2011
    • Posts 2
    • Points 40
    PCB: Properties attached to a component instance Reply

    Hello,

     In my Allegro PCB I have a property attached to the component instance, and I would like to extract it using a skill script but how ?

    Is there any body having this issue?

     Thanks for your help

     Thierry

    • Post Points: 35
  • Sat, Apr 9 2011 10:23 PM

    • Khurana
    • Top 25 Contributor
    • Joined on Thu, Aug 14 2008
    • Posts 238
    • Points 3,300
    Re: PCB: Properties attached to a component instance Reply

    Let me see if I can get the pseudocode right:

    - obtain the design dbid

    - obtain list of components

    - obtain component definition (compdef) for each component

    - obtain the propList for each comp_def

    - loop thru each prop in the propList

     

    • Post Points: 5
  • Sun, Apr 10 2011 1:14 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 717
    • Points 15,550
    Re: PCB: Properties attached to a component instance Reply

    Here's a small routine I have to display a data sheet based on the component part number property. I hope it adequately demonstrates how to obtain component properties:

    defun( ShowCompDataSheets ()
     let((dataShtsPath, popup, partNumber, pdfFile)
      dataShtsPath = "XXXXXXXXXX/DATASHEETS/"
      popup = axlUIPopupDefine(nil, list(list("Done", 'axlFinishEnterFun), list("Cancel", 'axlCancelEnterFun)))
      axlUIPopupSet(popup)
      axlSetFindFilter( ?enabled list( "NOALL" "COMPONENTS" "NAMEFORM") ?onButtons "COMPONENTS")
      while(axlSelect()
        partNumber = get(car(axlGetSelSet()) ->compdef ->prop, "PART_NUMBER")
        if(partNumber then
          pdfFile = strcat(dataShtsPath, partNumber, ".pdf")
          if(isFile(pdfFile) then axlPdfView(pdfFile) else axlUIConfirm("No pdf data sheet exists for this component"))
         else
          axlUIConfirm("This component has no part number as required to locate a datasheet")
        )
      )
      axlUIPopupSet(nil)
    ))

    Dave Elder, Tait Communications
    • Post Points: 20
  • Tue, May 31 2011 7:08 AM

    • GraF
    • Top 500 Contributor
    • Joined on Thu, Jul 31 2008
    • Terranuova Bracciolini, Arezzo
    • Posts 18
    • Points 195
    Re: PCB: Properties attached to a component instance Reply

    Hi eDave, your routine can solve a problem that I've into my dept but I need your help to obtain a "customized" version. 

    I need to know the string contains into the key-property "VALUE" of the components (which is passed by a PTF file when the compnonets are added to the schematic) when I'm using APD.

    I've tried (unsuccesfully) using the existing skill code "dsht.il" with some little modifications.

    I've realized that (perhaps) there's a different "compdef" related to key-properties which must be used to get values, but my understanding aren't so big..

    Many thanks in advance

    • Post Points: 20
  • Tue, May 31 2011 1:14 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 717
    • Points 15,550
    Re: PCB: Properties attached to a component instance Reply

    Hi,

    I think that there is probably a difference here between Allegro PCB and APD. I don't have APD so can't really help you. Maybe someone else can.

    Dave

    Dave Elder, Tait Communications
    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by Thierry22 at 07 Apr 2011 10:06 AM. Topic has 4 replies.