Hi folks,
Thanks to the PCB SKILL forum, i managed to create a few routines in skill in order to place component and wires.
However i am still stuck with a lack of knowledge in the "pcb wolrd" (i am more a virtuoso user)
I cannot add two different property on the element i put into the schematic with the ADD function. Indeed, i manage to put a 100k Ohm resistor, or a 0805 resistor, but i cannot put a 100kOhm, 0805 resistor... (i mean automatically). It can be done with the add/browser/clic button though.
* Can someone guide me to the proper skill methodology ?
* Should i try to add the component, then select it back (or keep it selectet, but how?) then add property (name of the cnSkill funct that does that?)
There is too few piece of information in conref.pdf to my mind.
Apart from this main question, i have another one : is there a concept skill function that gives a list of the pins and their position (xy) of the selected component ? Or should i parse the symbol.css ?
Thanks for any idea that would help me to go further.
here is a little __log file__
; $> cnskill -i -mpssession ebecheto_ProjectMgr13015handle=cnmpsImport()load(strcat(getShellEnvVar("CDSROOT") "/tools/fet/skill-01.00/context/cdscnCmnds.ini")) cnSendCommand(handle, "SET ADDFORM OFF" ) cmd="add <passifs>resistor.sym_1 \n add :%Value:VALUE=100k (0 0) (1000 1000 1)";<= ok add 100k rescmd="add <passifs>resistor.sym_1 \n add :%Value:PACK_TYPE=0805 (0 0) (1000 1000 1)";<= ok add 0805 res, no VALUE ; skill command to check if symbol exist? ; skill command get xy pins positon ? instead of parsing the symbol.css filecnSendCommand(handle cmd) cnSendCommand(handle, "ROUTE (0 0 1) (1000 1000 1)") cnSendCommand(handle, "undo") cnSendCommand(handle, "WIRE WIRENAME (0 0 1) (1000 1000 1)") cnSendCommand(handle, "window fit") cnSendCommand(handle, "_#zoom (0 0 1) (2000 2000 1)")unless(fboundp('linRg)defun(linRg (start stop step) let((norm r) r='() norm=round((stop-start)/step)for(x 0 norm r=tconc(r start+x*step)) car(r))));x=2Y=0 paires=foreach(mapcar x linRg(2 80 2) ;=> 2 4 6 .. 80netName=sprintf(nil"%s_%d""net" x) ;=> "net_2" .. "net_80"cmd=sprintf(nil"WIRE %s (0 %d 1) (400 %d 1)" netName Y Y) ;=> "WIRE net_2 (0 0 1) (400 0 1)"cnSendCommand(handle cmd) Y=Y+100 netName ); why cn* function not in listFunctions ?listFunctions("^cn.*");=> nil
____end___logFile.il
So if you share your idea, if will share my results with you.
++Ed