There are two methods in this operation.
Method 1: Export a HKP file by Automation from a central library, and change the line width in a HKP file.
Method 2: Change line width after accessing Cell DB by Automation and starting Cell Editor.
Method 1 and Method2 have the restraint of a version, respectively.
Method 1: The HKP file is enciphered from EE2007.3, And a license is required for a decipherment.
Method 2: The Cell DB control by Automation is supported from EE2007.5.
Which version do you use?
Oops, should have said something in the request.
As it looks like we will be upgrading as new releases come out, I would like to use Method 2. (we are currently using 2007.8)
I made sample script.
I was going to change the width of the original ASSEMBLY layer by Automation.
But I found the defect about saving of CellEditor by Automation.
Therefore, I made Automation which inputs the ASSEMBLY layer of new width.
An original ASSEMBLY layer deletes.
A new ASSEMBLY layer can be saved by Automation.
Please run a script by mgcscript on a command prompt.
Want to say that the script seemed (haven't checked 100%) to run GREAT. Thank you VERY much!
Quick question, to change from Assembly to Silkscreen, make the change below? (or is it harder than that?)
Set fabGfxs = celDoc.FabricationLayerGfxs(epcbFabAssembly, epcbSelectPlaced, epcbSideTopOrBottom, True)
Set fabGfxs = celDoc.FabricationLayerGfxs(epcbFabSilkscreen, epcbSelectPlaced, epcbSideTopOrBottom, True)
Again, thank you very much!
OK, got around to testing this, and looks like it ran perfect as provided for the assembly layer.
OK, this change kind of worked. It changed all the line sizes for me, but for some reason, when doing the Silkscreen layer, it somehow place the Silkscreen on the bottom, but not the bottom.
When I select it in draw mode, it says it's on mount side, but it shows as the wrong color.
When I use the display controls, it only shows up when I have bottom Silkscreen turned on.
BTW, when I select and reselect mount side, everything is fine. Another API bug, or do I need a change in the code, other than the one I made.
I found a little mistake.
Call celDoc.PutFabricationLayerGfx(fabGfx.Type, epcbSideTopOrBottom, newWidth(i, 1), UBound(pArr, 2) + 1, _
Moreover, it modified so that DisplayCondition might be succeeded from an original object.
A new script processes Assembly and a Silkscreen layer.
FabricationLayerGfxs(epcbFabAssembly, --> FabricationLayerGfxs(epcbFabAssembly + epcbFabSilkscreen,
Please check a new script.
OK, Code ran perfect. Again, thanks a bunch!!!! Saved me MANY hours of work.
(BTW, had to change your code, as our old library had the same size silk and assembly. But from now on, I can run it as is.)