• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X PCB Editor
  3. Half filled shape in vias

Stats

  • Replies 16
  • Subscribers 162
  • Views 18109
  • Members are here 0
More Content

Half filled shape in vias

vimaldevlpr
vimaldevlpr over 5 years ago

Hi, 

Is any way to find the location half filled shape in via using skill. if it possible can anyone please share me the code or guide me how to do it.

Like this Red color via 

  • Sign in to reply
  • Cancel
Parents
  • luanvn81
    luanvn81 over 5 years ago

    Hi!

     

    Fullscreen svc.txt Download
    ���-�����88���)���3BB����CC��^^e
    �Hl�c���5*J�ddd��]��5F�%�D�hܻ����K���NG�Ñ����ɦ
    �_@��}D������y<�b�d����)@f����צi��Gͽe�p������-"�z
    PfhzMk�f�m�������t"�}�?����I_���3��gLXzoZ�l[ل.;Cc;�
    Pd�o���ZL��%{&�)/���T�n�̔{�H���
    </>�",�E5�"�	�_j6Y���R������ͺ�f�,��0�p2q=l��?�?��TOy����;�g�1��Ӳ���J���R������&����{�a��N4�ێ1웝]�O�b����_)�����Ù<��{��"���;�o=WQV9oC�E�A<����ݙ�u �9�=����k!%3��g��#s2l�a~��M6wR,5�*Y�<�����ji�HRf��7�u�X���~�Vҡ�=c,]w�z%�Z6�;�Q�A5Xy4���U��������q����G_ A
    C���X��	B\̃��M<��SN���󟪐+���03������O����}�c91ٛ6��K���<L�W�^�+73���gQ=������ ������L֪��:2�6F-/$Vs{�O�w�������G��<����u?~`���S��Mf?tvM�=O��;Q<I�
    /P�p���qvݩ�,S���t�D���^�F���@xRL5-�1L�w�&�D�pT~:���%����������G��]�21_}rp̒�/��_OR��Ȓy��!������q���K�����g����(�%/��yʊ�L���r���IR���{D)������I��h���u�T�����26�pDw9fiS�"�z��ߦ���L�d�l\���>fn4��S�"��0AT;X
    ~�F2k�� \2S�-:s�̜�-o��_�13��
    �H�p�Ӂr�6���$P'h&�8�W$�a��DW.d���f���������
    ���#�E@iO���t��CVƞ��U/�D�Py����/�҂S������:ɑ��V�P
    T��[)Ր�a���_�
    �E����~;������r��A��(�%�Z�Ҫ��~H6�lOaMWv^:��
    9�<�������~��ϋWD��>�Nʼe15h�|Ž?'@}:�D)�l��G��rsj�U#d��"�s�]���}����RfT^'\�HS�2�� �e)@ݫ�J����ۖ���4�|��?�W5V~=Ў`�&��;a}Zʙ��^h�.�,9����������<>쐇�ԖQ����$�7(|��pL������r)�,�f�	*��9�k<������{����8��w�٧��TfK�;,D`?��9R�Pҙ����.5�4�(���-a)?���`�5qTs�1$��atan�Bp�n�����n,}�of�w�=����qS�A���>"!x�/`�=�6�e�&Ib,���%��������?�S��CI?4x��#�`��K6����u��If�������2�Ɩݠ�ۨ�>����p�k��Nq�…h���B���tiu��n�u������;��6��(�\�-���ؘ8�AvaWAn+�
    �E=�$��ڤ��l��7@����
    rAU��|���<e$nZ^�0O��rgtf�sfJ/�d���MF��0o3�(����#���a�_���HaZ
    �kl�^k�8��,Qxy���e陪���Ư�!�H���G]#
    V���V��4kwh��O7��Gy�豃���8���DΤ�������!�5*f��)���V���u �z�p�.y$��<�M���κ�G��q���C�~�Ź��xJm�'WV|zuIn�K�n�U�Բ�҆{!��	uۣ��|O˫a���E28]-,X�
    9>��r3Yax�LB"h�ݽ���,q0�!f�c� ����'�ż�31H�I�}>� �g�"
    u���T������ٰ�a�h�+�z8zx*̞l�:��L���~�B�p����������=�����3����=�8'4��vI�ח���wd�1�x�kk~�d�-;����ءs��P��a�c����ۼ:>�RgtB@>Hw��p�w���ϋ�1d�k�q����z0g��K�<��-q@<�HrW��X9jI+,�3 �c����� hr�I6y��.�)����(���<CnwM:�%l�U`�/��YkG6s���)������Z�bޠ+�b cb,˕)�5��TT�ؔ�'�k�Z,����ۆ�h�Љ_��Ȣ��E����	\��J"���3���"
    Hope this code can help you. Please change svc.txt into svc.il for using.

    Luan.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • vimaldevlpr
    vimaldevlpr over 5 years ago in reply to luanvn81

    Hi Luan,

    Kindly Thanks for your reply it shows me error like this.. Can you please guide me to run the file please..

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • luanvn81
    luanvn81 over 5 years ago in reply to vimaldevlpr

    Hi Vimaldevlpr!

    Sorry, try below code please.

    axlCmdRegister("svc" `svc)
    (defun svc ()
    originalVisible=axlVisibleGet()
    designName = axlCurrentDesign()
    design_path = axlGetDrawingName()
    design_unit = car(axlDBGetDesignUnits())
    View_list = list()

    ;#### SELECT SHAPES TO CHECK ####
    axlSetFindFilter(?enabled '(noall SHAPES) ?onButtons '(noall SHAPES))
    axlClearSelSet()
    mypopup = axlUIPopupDefine( nil (list (list "Done" 'axlFinishEnterFun) (list "Cancel" 'axlCancelEnterFun)))
    axlUIPopupSet( mypopup)
    AllShapeCheck = axlGetSelSet(axlSelect(?prompt "Please Select Shape..."))
    axlClearSelSet()
    AllShapeCheck = setof(element AllShapeCheck element->fillet == nil) ;loai bo shape la fillet shape

    ;=====Prepare to check via =====
    if(length(AllShapeCheck)== 0 then
    axlUIConfirm("No shape found!")
    else
    writeOutFile = outfile("./svc.log" "w")
    timeperform = fileTimeModified("svc.log")
    fprintf(writeOutFile, "Design name: %s\n", design_path)
    fprintf(writeOutFile, "%s %s\n\n", "Date: ", timeToString(timeperform))
    fprintf(writeOutFile, "%s\n", "--------------------------------------------------------------------------")
    fprintf(writeOutFile, "%-5s %-10s %-10s %-20s %-22s\n\n", "No", "Layer", "Net Name", "Via Name", "Location")
    STT = 0

    foreach(shape AllShapeCheck
    shape_layer = lastelem(parseString(shape->layer "/"))
    shape_poly = car(axlPolyFromDB(shape))
    via_connects = axlDBGetConnect(shape t)
    foreach(via via_connects
    via_poly = car(axlPolyFromDB(via ?layer shape->layer ?padType "REGULAR"))
    ANDPoly = car(axlPolyOperation(shape_poly via_poly 'AND))
    if(ANDPoly->area < via_poly->area then
    View_list = cons(sprintf(nil , "%-10s %-10s %-20s %L", shape_layer, via->net->name, via->name, via->xy) View_list)
    )
    );foreach via
    );foreach shape

    View_list = sort(View_list 'alphalessp)
    foreach(item View_list
    STT = STT + 1
    fprintf(writeOutFile,"%-5d %-s\n", STT, item)
    );end foreach
    close(writeOutFile)
    if(STT > 0 then
    axlUIViewFileCreate("svc.log" "Via contact report..." nil);t xoa file sau khi xem, nil khong xoa
    else
    axlUIConfirm( "No Error found.")
    if(isFile("svc.log") == t then deleteFile("svc.log"));end if
    ); end if count_drc
    );end if
    );end defun svc

    Luan.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • vimaldevlpr
    vimaldevlpr over 5 years ago in reply to luanvn81

    Hai Luan,

    Thanks for your quick response actually my requirement is find out the vias if shape is not fully covered. as yours code shows me all the connected vias with the shape. i'll attach the example image below.

    Here in the image shape covered half of the via. in this kind of vias I need to find out.

      

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • luanvn81
    luanvn81 over 5 years ago in reply to vimaldevlpr

    Hi !

    I have repaired the code, please try again.

    axlCmdRegister("svc" `svc)
    (defun svc ()
    originalVisible=axlVisibleGet()
    designName = axlCurrentDesign()
    design_path = axlGetDrawingName()
    design_unit = car(axlDBGetDesignUnits())
    View_list = list()

    ;#### SELECT SHAPES TO CHECK ####
    axlSetFindFilter(?enabled '(noall SHAPES) ?onButtons '(noall SHAPES))
    axlClearSelSet()
    mypopup = axlUIPopupDefine( nil (list (list "Done" 'axlFinishEnterFun) (list "Cancel" 'axlCancelEnterFun)))
    axlUIPopupSet( mypopup)
    AllShapeCheck = axlGetSelSet(axlSelect(?prompt "Please Select Shape..."))
    axlClearSelSet()
    AllShapeCheck = setof(element AllShapeCheck element->fillet == nil) ;loai bo shape la fillet shape

    ;=====Prepare to check via =====
    if(length(AllShapeCheck)== 0 then
    axlUIConfirm("No shape found!")
    else
    writeOutFile = outfile("./svc.log" "w")
    timeperform = fileTimeModified("svc.log")
    fprintf(writeOutFile, "Design name: %s\n", design_path)
    fprintf(writeOutFile, "%s %s\n\n", "Date: ", timeToString(timeperform))
    fprintf(writeOutFile, "%s\n", "--------------------------------------------------------------------------")
    fprintf(writeOutFile, "%-5s %-10s %-10s %-20s %-22s\n\n", "No", "Layer", "Net Name", "Via Name", "Location")
    STT = 0

    foreach(shape AllShapeCheck
    shape_layer = lastelem(parseString(shape->layer "/"))
    shape_poly = car(axlPolyFromDB(shape))
    axlSetFindFilter(?enabled '(noall VIAS) ?onButtons '(noall VIAS))
    axlClearSelSet()
    via_list = setof(element axlGetSelSet(axlSingleSelectBox(shape->bBox)) element->net->name == shape->net->name)
    ;via_list = axlDBGetConnect(shape t)
    foreach(via via_list
    via_poly = car(axlPolyFromDB(via ?layer shape->layer ?padType "REGULAR"))
    ANDPoly = car(axlPolyOperation(shape_poly via_poly 'AND))
    if(ANDPoly->area < via_poly->area then
    View_list = cons(sprintf(nil , "%-10s %-10s %-20s %L", shape_layer, via->net->name, via->name, via->xy) View_list)
    )
    );foreach via
    );foreach shape

    View_list = sort(View_list 'alphalessp)
    foreach(item View_list
    STT = STT + 1
    fprintf(writeOutFile,"%-5d %-s\n", STT, item)
    );end foreach
    close(writeOutFile)
    if(STT > 0 then
    axlUIViewFileCreate("svc.log" "Via contact report..." nil);t xoa file sau khi xem, nil khong xoa
    else
    axlUIConfirm( "No Error found.")
    if(isFile("svc.log") == t then deleteFile("svc.log"));end if
    ); end if count_drc
    );end if
    );end defun svc

    Tks.

    Luan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • luanvn81
    luanvn81 over 5 years ago in reply to vimaldevlpr

    Hi !

    I have repaired the code, please try again.

    axlCmdRegister("svc" `svc)
    (defun svc ()
    originalVisible=axlVisibleGet()
    designName = axlCurrentDesign()
    design_path = axlGetDrawingName()
    design_unit = car(axlDBGetDesignUnits())
    View_list = list()

    ;#### SELECT SHAPES TO CHECK ####
    axlSetFindFilter(?enabled '(noall SHAPES) ?onButtons '(noall SHAPES))
    axlClearSelSet()
    mypopup = axlUIPopupDefine( nil (list (list "Done" 'axlFinishEnterFun) (list "Cancel" 'axlCancelEnterFun)))
    axlUIPopupSet( mypopup)
    AllShapeCheck = axlGetSelSet(axlSelect(?prompt "Please Select Shape..."))
    axlClearSelSet()
    AllShapeCheck = setof(element AllShapeCheck element->fillet == nil) ;loai bo shape la fillet shape

    ;=====Prepare to check via =====
    if(length(AllShapeCheck)== 0 then
    axlUIConfirm("No shape found!")
    else
    writeOutFile = outfile("./svc.log" "w")
    timeperform = fileTimeModified("svc.log")
    fprintf(writeOutFile, "Design name: %s\n", design_path)
    fprintf(writeOutFile, "%s %s\n\n", "Date: ", timeToString(timeperform))
    fprintf(writeOutFile, "%s\n", "--------------------------------------------------------------------------")
    fprintf(writeOutFile, "%-5s %-10s %-10s %-20s %-22s\n\n", "No", "Layer", "Net Name", "Via Name", "Location")
    STT = 0

    foreach(shape AllShapeCheck
    shape_layer = lastelem(parseString(shape->layer "/"))
    shape_poly = car(axlPolyFromDB(shape))
    axlSetFindFilter(?enabled '(noall VIAS) ?onButtons '(noall VIAS))
    axlClearSelSet()
    via_list = setof(element axlGetSelSet(axlSingleSelectBox(shape->bBox)) element->net->name == shape->net->name)
    ;via_list = axlDBGetConnect(shape t)
    foreach(via via_list
    via_poly = car(axlPolyFromDB(via ?layer shape->layer ?padType "REGULAR"))
    ANDPoly = car(axlPolyOperation(shape_poly via_poly 'AND))
    if(ANDPoly->area < via_poly->area then
    View_list = cons(sprintf(nil , "%-10s %-10s %-20s %L", shape_layer, via->net->name, via->name, via->xy) View_list)
    )
    );foreach via
    );foreach shape

    View_list = sort(View_list 'alphalessp)
    foreach(item View_list
    STT = STT + 1
    fprintf(writeOutFile,"%-5d %-s\n", STT, item)
    );end foreach
    close(writeOutFile)
    if(STT > 0 then
    axlUIViewFileCreate("svc.log" "Via contact report..." nil);t xoa file sau khi xem, nil khong xoa
    else
    axlUIConfirm( "No Error found.")
    if(isFile("svc.log") == t then deleteFile("svc.log"));end if
    ); end if count_drc
    );end if
    );end defun svc

    Tks.

    Luan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • vimaldevlpr
    vimaldevlpr over 5 years ago in reply to luanvn81

    Hai luan One more last Suggestion 

    Instead of picking fully wants to check.

    AllShapeCheck = axlGetSelSet(axlSelect(?prompt "Please Select Shape..."))

    AllShapeCheck = axlGetSelSet(axlAddSelectAll())

    like this method

    it shows me E- *Error* lessp: can't handle (nil < 314.1593) 

    can you please update it..

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • luanvn81
    luanvn81 over 5 years ago in reply to vimaldevlpr

    Hi!

     I have updated code. 

    axlCmdRegister("svc" `svc)
    (defun svc ()
    originalVisible=axlVisibleGet()
    designName = axlCurrentDesign()
    design_path = axlGetDrawingName()
    design_unit = car(axlDBGetDesignUnits())
    View_list = list()

    ;#### SELECT SHAPES TO CHECK ####
    AllShapeCheck = axlDBGetShapes("ETCH")
    ;AllShapeCheck = setof(element AllShapeCheck element->fillet == nil) ; fillet shape

    ;=====Prepare to check via =====
    if(length(AllShapeCheck)== 0 then
    axlUIConfirm("No shape found!")
    else
    writeOutFile = outfile("./svc.log" "w")
    timeperform = fileTimeModified("svc.log")
    fprintf(writeOutFile, "Design name: %s\n", design_path)
    fprintf(writeOutFile, "%s %s\n\n", "Date: ", timeToString(timeperform))
    fprintf(writeOutFile, "%s\n", "--------------------------------------------------------------------------")
    fprintf(writeOutFile, "%-5s %-10s %-10s %-20s %-22s\n\n", "No", "Layer", "Net Name", "Via Name", "Location")
    STT = 0

    foreach(shape AllShapeCheck
    shape_layer = lastelem(parseString(shape->layer "/"))
    shape_poly = car(axlPolyFromDB(shape))
    axlSetFindFilter(?enabled '(noall VIAS) ?onButtons '(noall VIAS))
    via_list = setof(element axlGetSelSet(axlSingleSelectBox(shape->bBox)) element->net->name == shape->net->name)
    ;via_list = axlDBGetConnect(shape t)
    axlClearSelSet()
    foreach(via via_list
    via_poly = car(axlPolyFromDB(via ?layer shape->layer ?padType "REGULAR"))
    ANDPoly = car(axlPolyOperation(shape_poly via_poly 'AND))
    if(ANDPoly != nil && ANDPoly->area < via_poly->area then
    View_list = cons(sprintf(nil , "%-10s %-10s %-20s %L", shape_layer, via->net->name, via->name, via->xy) View_list)
    )
    );foreach via
    );foreach shape

    View_list = sort(View_list 'alphalessp)
    foreach(item View_list
    STT = STT + 1
    fprintf(writeOutFile,"%-5d %-s\n", STT, item)
    );end foreach
    close(writeOutFile)
    if(STT > 0 then
    axlUIViewFileCreate("svc.log" "Via contact report..." nil);t xoa file sau khi xem, nil khong xoa
    else
    axlUIConfirm( "No Error found.")
    if(isFile("svc.log") == t then deleteFile("svc.log"));end if
    ); end if count_drc
    );end if
    );end defun svc

    Tks 

    Luan.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • vimaldevlpr
    vimaldevlpr over 5 years ago in reply to luanvn81

    Hi Luan,

    One suggestion please for larger brd files it takes more time to complete can you please update this code for checks  only visible layer in brd file or choosing shapes like temp group method can you please update this code.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • luanvn81
    luanvn81 over 5 years ago in reply to vimaldevlpr

    Hi!

    you can try below code for choosing shapes:

    ;#### SELECT SHAPES TO CHECK ####
    axlSetFindFilter(?enabled '(noall SHAPES) ?onButtons '(noall SHAPES))
    axlClearSelSet()
    mypopup = axlUIPopupDefine( nil (list (list "Done" 'axlFinishEnterFun) (list "Cancel" 'axlCancelEnterFun)))
    axlUIPopupSet( mypopup)
    AllShapeCheck = axlGetSelSet(axlSelect(?prompt "Please Select Shape..."))
    axlClearSelSet()
    AllShapeCheck = setof(element AllShapeCheck element->fillet == nil) ;ignore fillet shape

    Luan.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • vimaldevlpr
    vimaldevlpr over 5 years ago in reply to luanvn81

    Kindly Thanks a lot for your support and help

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information