Can you create a sample LUA script I can run in FAB 3000 that will find all Donut Flashes and add a clear inner hole?
Posted over 10 years ago by Numerical Support Team
Post a topicPeople who like this
Delete Comment
This post will be deleted permanently. Are you sure?
0 Votes
2 Comments
as-fablxforum posted over 10 years ago
tried this script, but only got following error:
[CODE]'_Run App
LUA File: F:\Downloads\add_clear2donut.lua
F:\Downloads\add_clear2donut.lua:24: attempt to call field 'dbGetDcodeNum' (a nil value)[/CODE]
There was a gerberfile with donuts loaded.
0 Votes
Numerical Support Team posted over 10 years ago
-- LUA Application File -- Purpose is to find all Donut Flashes and add a clear inner hole -- Which prevents traces from appearing within the ID -- Flashed Pads Filter arObjectTypes = fab3000.dbIntArray() arObjectTypes:append( fab3000.dbcFlashType ) -- Select All Flashed Pads sset = fab3000.dbSelectionSet() sset:setTypeFilter( arObjectTypes ) nCount = sset:selectAll() - 1 -- Loop Through Selected Objects for nVal = 0, nCount, 1 do --Get Object Center myObject = sset:index( nVal ) myBox = fab3000.dbBox() fab3000.dbGetBBox(myObject, myBox) myCenterPt = myBox:getCenter(); --Get Dcode and Layer nDcode = fab3000.dbGetDcodeNum( myObject ); nLayer = fab3000.dbGetLayerNum( myObject ); --Get Aperture myAptCheck = fab3000.dbAperture() fab3000.dbGetAperture( nDcode, myAptCheck ) --Add Composite Circle if myAptCheck:getType()==fab3000.dbApertureTypeDonut then --Note: I assigned a default Composite value of 5 fab3000.uiAddCircle( nLayer, 5, myCenterPt, myAptCheck:getID() ); end end0 Votes
Login or Sign up to post a comment