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
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
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)))
In reply to eDave:
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
In reply to GraF:
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.